Title - UPDATE SQL statement Tags - sqlstatements
The UPDATE statement edits a row in a table.
Useful when you want to change existing records.
Example:
UPDATE celebs SET twitter_handle = ‘@taylorswift13’ WHERE id = 4;
UPDATE is a clause that edits a row in the table.
celebs is the name of the table.
SET is a clause that indicates the column to edit.
twitter_handle is the name of the column that is going to be updated.
@taylorswift13 is the new value that is going to be inserted into the twitter_handle column.
WHERE is a clause that indicates which row(s) to update with the new column value. Here, the row with a 4 in the id column will habve the twitter_handle updated to @taylorswitft13.