MySQL DROP Command Usage



As the name explains, it is used to completely remove the table from the database.

Syntax

Drop table table_name;

Example

mysql> Drop table Student;
Query OK, 0 rows affected (0.09 sec)

The query above completely removes the ‘Student’ table from the database. We can observe as MySQL returns an error message after running the following query −

mysql> Select * from Student;
ERROR 1146 (42S02): Table 'query.student' doesn't exist
Updated on: 2020-06-20T06:00:45+05:30

136 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements