$ settings --editor

$ settings --general

$ save --settings

SQL for beginners

Removing a table with DROP TABLE #

The DROP TABLE statement permanently removes a table and every row it contains:

DROP TABLE table_name;
  • table_name: The table to remove.
There is no undo

Unlike DELETE, which removes rows but keeps the table itself, DROP TABLE removes the table's structure and all of its data at once. There is no WHERE clause to narrow it down — always be certain before running it.


Exercise #

Write a command that removes the order_items table entirely, without affecting any other table.

Tests #

  • The order_items table no longer exists.
  • The customers, products, and orders tables still exist.
Solution
DROP TABLE order_items;
Output will be displayed here