To discover more intermediate courses and gain hands-on experience in SQL, register to DataCamp's Intermediate SQL tutorial. Learn Data Science by completing interactive coding challenges and watching videos by expert instructors. Start Now!

Deleting rows


Deleting rows is very similar to updating rows, only that type of update done to the row is a delete.

Here is the syntax:

DELETE FROM table_name WHERE column1 = value1 AND column2 = value2 ...

All rows which meet the criteria of the DELETE query will be deleted.

Exercise

Add a DELETE statement which deletes Eric from the customers table.


Copyright © learnsqlonline.org. Read our Terms of Use and Privacy Policy