October 2002
Beginner
864 pages
18h 41m
English
The purpose of the UPDATE statement is to change the values of existing records. The syntax is |
UPDATE table_name SET columnname1 = value1 [, columname2 = value2]... WHERE search_condition
This statement checks the WHERE clause first. For all records in the given table in which the WHERE clause evaluates to TRUE, the corresponding value is updated.
This example illustrates the use of the UPDATE statement:
SQL> UPDATE COLLECTION 2 SET WORTH = 900 3 WHERE ITEM = 'STRING'; 1 row updated.
To confirm the change, the query
SQL> SELECT * FROM COLLECTION 2 WHERE ITEM = 'STRING';
yields ...
Read now
Unlock full access