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 Multiple Columns Statement

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

Oracle UPDATE Multiple Columns Syntax

To update multiple columns in existing table, use the following syntax:


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


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 update multiple columns first name and last name for the record having cellNo '2342323234' in tblCustomerLoan table:


UPDATE tblCustomerLoan 
SET firstName = 'Sunil', lastName = 'Shetty' 
WHERE cellNo = 2342323234;


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