Question30
Remaining:

How to delete a table along with its data?

Sample Answer

Show Answer by Default

The DROP TABLE command is used to delete a table and all its data from the database.

Syntax

MySQL 8.1
DROP TABLE table_name;

Features:

  • All data, indexes, triggers, and permissions associated with the table are deleted.
  • The action is irreversible unless backup or recovery mechanisms are in place.