Complete the code to delete all rows from the table named 'employees'.
DELETE FROM [1];The correct table name is 'employees'. This command deletes all rows from that table.
Complete the code to remove all rows quickly from the table named 'orders' without logging individual row deletions.
TRUNCATE TABLE [1];TRUNCATE TABLE orders removes all rows quickly and resets storage without logging each row deletion.
Fix the error in the command to delete rows from 'customers' where the city is 'Paris'.
DELETE FROM customers WHERE city [1] 'Paris';
In SQL, the equality operator is '='. Using '==' or '===' causes syntax errors.
Fill both blanks to write a command that deletes all rows from 'products' but logs each deletion.
DELETE FROM [1] WHERE [2];
DELETE FROM products WHERE 1=1 deletes all rows and logs each deletion. '1=1' is always true.
Fill the blanks to write a command that truncates the 'logs' table and resets identity counters.
TRUNCATE TABLE [1] [2] RESTART IDENTITY;
TRUNCATE TABLE logs CASCADE RESTART IDENTITY; truncates logs, resets IDs, and cascades to dependent tables.