SQL - Drop Table Statement
- Remove or delete a table from the SQL database.
- Child tables should also be dropped before dropping any table otherwise it can’t be dropped due to its integrity.
DROP TABLE table_name;
Below is the Student Table.
Let us Drop this student table.
mysql> Drop Table Student;
Query OK, 0 rows affected (0.98 sec)
We will get below error if we’ll try DESC command.
mysql> Desc Student;
ERROR 1146 (42S02): Table 'testing.student' doesn't exist
Please note we are using testing data base here.