May 2003
Intermediate to advanced
592 pages
14h 28m
English
Once your tables contain some data, you have the option of changing existing records. The most frequent reason for doing this would be if information were entered incorrectly. Or, in the case of user information, if data gets changed (such as a last name or email address) and that needs to be reflected in the database.
The syntax for updating records is
UPDATE tablename SET column='value';
You can alter multiple columns of one record at a single time, separating each by a comma.
UPDATE tablename SET column1='value', column2='value2'...;
Normally you will want to use a WHERE clause to specify what rows to affect; otherwise, the change would be applied to every row.
UPDATE tablename SET column1='value' WHERE column2='value2'; ...
Read now
Unlock full access