The following command will delete all rows in the
rent_payments table where
dollar_amount = 0.
-- Works in PostgreSQL, MySQL, SQL Server, and Oracle delete from rent_payments where dollar_amount = 0;
tenant table before
tenant table after
If you want to delete all data in a table, just don’t use a filter. For example,
delete from tenants; would remove all data from the