By Hemanta Sundaray on 2022-12-16
UPDATE statement edits a row in a table. You can use the UPDATE statement when you want to change existing records.
The statement below updates the record with an
id value of 1 to have the blood_group AB+.
UPDATE students SET blood_group = 'AB+' WHERE id = 1;
UPDATE is a clause that edits a row in the table. students is the name of the table. SET is a clause that indicates the column to edit. WHERE is a clause that indicates which row(s) to update with the new column value. Here the row with a 1 in the id column is the row that will have the blood_group updated to AB+.