Deleting Data
Explore how to delete data rows from SQL tables using the DELETE statement combined with WHERE conditions, ORDER BY sorting, and LIMIT restrictions. Understand when to delete rows versus updating columns and learn how to safely remove single or multiple records without deleting the table itself.
We'll cover the following...
We'll cover the following...
Deleting Data
We can delete rows from a table using the DELETE statement. A delete statement deletes an entire row and not individual columns. If changing a particular column value for a row is desired, use the UPDATE statement, which we will cover next. Also realize that deleting all the rows of a table doesn’t delete the table itself.
Example Syntax
DELETE FROM table
WHERE col3 ...