SQL Delete Flashcards
1
Q
How do you delete rows from a database table?
A
An SQL delete statement is how rows get removed from tables.
delete from “products”
where “productId” = 24
returning *;
2
Q
How do you accidentally delete all rows from a table?
A
By not specifying the rows to be deleted by using the ‘where’ clause.