Database Reference
In-Depth Information
FROM SONG S, CDTRACK C, MUSICCD M
WHERE M.TITLE = T.TITLE
AND M.MUSICCD_ID = C.MUSICCD_ID
AND C.SONG_ID = S.SONG_ID)
WHERE ARTIST_NAME = 'Sheryl Crow';
SQL*Plus Worksheet will reply, “3 rows updated.”
Let's illustrates several points about the UPDATE command:
The data in the current row is available for use, so you can update a
value using itself or other values in the current row. This refers to the
correlating column alias called T.TITLE shown in the previous query,
passed from the calling query to the subquery.
The WHERE clause (in the UPDATE command) can reference col-
umns that are updated, using the value before the update.
You can use a mixture of literals, subqueries, and functions in the
same UPDATE command.
Figure 15.13
Sheryl Crow Is
Now Uppercase as
a Result of an
UPDATE
Command.
Search WWH ::




Custom Search