sql-delete Flashcards
1
Q
How do you delete rows from a database table?
A
delete from "products" where "productId" = 24 And “name” = ‘shamwow’ And “price” < 20 returning *;
2
Q
How do you accidentally delete all rows from a table?
A
delete from “products”;
deletes all the rows but leaves the structure of the table in place.