Here we will learn about the UPDATE statement in Oracle. What is the use of it and syntax for the same.
UPDATE statement is used to update one or more record in DB table.
Syntax for UPDATE statement
UPDATE <table_name> SET <column_name> =<value> WHERE <condition>
- Name of the table of which record is going to be updated.
- Name of column in table to update.
- Value with which above column will be updated
- Used to filter out the records to update in table.
UPDATE Statement Example
We will use employee dummy table for our example. DDL(Data definition language) query for employee would be
create table employee(name varchar2(10), surName varchar(20), Address varchar2(40), phone number)
For example purpose we will populate dummu table with some dummy data. Below is the query for the same.
Update all record in employee table with phone number as “111111” where phone >