Removing Specific Rows3:17 with Andrew Chalkley
Like with SELECT and UPDATE statements, you can use a WHERE clause to narrow in on specific rows to remove for a table.
To delete specific rows from a table:
DELETE FROM <table> WHERE <condition>;
DELETE FROM users WHERE email = "email@example.com"; DELETE FROM movies WHERE genre = "Musical"; DELETE FROM products WHERE stock_count = 0;
See all of the SQL used in Modifying Data With SQL in the Modifying Data With SQL Cheatsheet.
You need to sign up for Treehouse in order to download course files.Sign up