September 2007
Intermediate to advanced
600 pages
20h 21m
English
Now, take a closer look at the SQL statement you just used. The first line issued the UPDATE statement and specified the name of the table to update. As with the INSERT and DELETE statements, the table name is required.
You next specified the column you wanted to change and its new value:
SET FirstName='Ben'
This is an instruction to update the FirstName column with the text Ben. The SET keyword is required for an UPDATE operation, because updating rows without specifying what to update makes little sense.
The SET keyword can be used only once in an UPDATE statement. If you are updating multiple rows—for example, to change Benjamin to Ben and to set the LastName to Forta in one operation—the SET keyword would look like this: ...
Read now
Unlock full access