Oracle Tutorial

What is Oracle
SQL Keywords

Oracle Wildcards

Oracle Wildcards

Oracle Aliases

Oracle Aliases

MySQL Tutorial

MySQL Tutorial

PL/SQL Tutorial

PL/SQL Tutorial

Oracle Interview Questions

Oracle Interview Questions and Answers


Oracle Update Statement

In Oracle, UPDATE statement allows you to update the existing column in a table. You can use the UPDATE statement to change column values of a single row, a group of rows, or all rows in a table.

Note: One or more field can be updated altogether. You can add any condition to check before updating the record by using WHERE clause.

Oracle UPDATE TABLE Syntax

To update the existing record in table, use the following syntax:

Syntax

UPDATE tablename 
SET field1 = newvalue1, field2 = new-value2 
[WHERE Condition]  

Parameters:

tablename: The table name from which you want to update.

Conditions: To add specific condition. The conditions parameter is optional.

Oracle UPDATE TABLE examples

The following Oracle statement to updating first name and last name for record having cellNo '2342323234' in tblCustomerLoan table:

Example

UPDATE tblCustomerLoan 
SET firstName = 'Sunil' 
WHERE cellNo = 2342323234;

Note:

In the above example, we have updated first name for the record having cellNo '2342323234' in existing table "tblCustomerLoan".