DROP Table

In MariaDB, DROP TABLE statement is used to drop a table from a database. It deletes the tables permanently and cannot be recovered.

Syntax:


DROP TABLE table_name ; 

Example:

Drop the table "Students" created within "Javatpoint" database.


DROP TABLE Students; 
Mariadb Drop table 1

You can verify whether the table is deleted or not.


SHOW TABLES; 

Output:

Mariadb Drop table 2

You can see that there is no table in database.

Mariadb Drop table 3

Table is now dropped permanently.


# DROP table using Management Studio

You can drop table using management studio tool. Select the table you want to delete and right click on that. You will see a page like this:

Mariadb Drop table 4

Click on "Drop". It will generate a pop-up box like this:

Mariadb Drop table 5

Click on ok.

Now the table is deleted. You can verify it by using SHOW statement.


SHOW TABLES;

Output:

Mariadb Drop table 6

You can see that table is deleted now.