The SQL DELETE command deletes rows from a table.

Delete grammar

The DELETE command is very straightforward. All it needs is a WHERE clause like we have in SELECT and UPDATE. Naturally, be careful with the delete command! There is no “undo” operation apart from restoring from backups.

    FROM tbl_name
    [WHERE where_condition]


delete from students where firstname = 'maria' and lastname = 'franklin';
delete from students where gpa < 2.0;
CINF 201 material by Joshua Eckroth is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Source code for this website available at GitHub.