0 votes
in MariaDB by
How to delete a table in MariaDB's database?

1 Answer

0 votes
by
DROP TABLE command is used to delete a table from a database in MariaDB. It deletes the table permanently and cannot be recovered. You must have DROP privilege for each table. All table data and the table definitions are removed, as well as triggers associated with the table so very careful with this statement!

If any of the tables named in the argument list do not exist, MariaDB returns an error indicating by name which not existing tables it was not unable to drop, but it also drops all of the tables in the list that does exist.

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; //command  

Output

Mariadb Drop table 2

Related questions

0 votes
asked Dec 15, 2020 in Sql by SakshiSharma
0 votes
asked Jan 2 in MariaDB by john ganales
...