Explain the difference between DELETE, TRUNCATE, and DROP in SQL.
Use PostgreSQL-compatible SQL to demonstrate the expected effect of each operation without permanently modifying the supplied sample tables. Report the affected rows, remaining rows, and whether the table object remains available.
Output
- One row for each operation:
DELETE, TRUNCATE, and DROP
- Columns:
operation, rows_affected, rows_remaining, and object_state
- Order rows in the sequence
DELETE, TRUNCATE, DROP; use NULL for values that do not apply