UPDATE
The user can update the existing data with an UPDATE statement.
The user can update with specifying condition using following general syntax:
UPDATE table_name SET attribute1=value1, attribute2=value2, ....WHERE filter condition
When the UPDATE statement is executed, all the attribute columns that satisfy the specified filter condition will be updated to the new values.
Cases Example:
After ABC company completed its database. One of its member, Julia Kennedy, notified the staff that she moved from Florida to Ohio. ABC company staff pulls out Customer table and identifies Julia Kennedy's original record as following:
+----+---------------+----------+---------+----------+--------+-----+
| id | name | language | state | company | gender | age |
+----+---------------+----------+---------+----------+--------+-----+
| 4 | Julia Kennedy | Italian | Florida | Fivespan | Female | 30 |
+----+---------------+----------+---------+----------+--------+-----+
The staff can use either of following two commands to revise Julia Kennedy's record:
UPDATE Customer SET state='Ohio' WHERE name='Julia Kennedy'
Julia Kennedy's record will be revised to be following:
+----+---------------+----------+-------+----------+--------+-----+
| id | name | language | state | company | gender | age |
+----+---------------+----------+-------+----------+--------+-----+
| 4 | Julia Kennedy | Italian | Ohio | Fivespan | Female | 30 |
+----+---------------+----------+-------+----------+--------+-----+