SQL DROP TABLE

The SQL DROP TABLE statement is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table.

NOTE: You have to be careful while using this command because once a table is deleted then all the information available in the table would also be lost forever.

Now see the syntax to drop the table from the database.

DROP TABLE "table_name";

First test EMP table and then we would delete it from the database.

SQL> DESC EMP;
FILELD TYPE NULL KEY DEFAULT EXTRA
ID Int(11) NO PRI
Name Varchar(20) NO
Age Int(11) NO
Address Varchar(25) YES NULL

This shows that EMP table is available in the database, so we can drop it as follows:

SQL>DROP TABLE EMP;

SQL DROP TABLE Example in MySQL

Let's see the command to drop a table from the MySQL database.

DROP TABLE admin_emp;

SQL DROP TABLE Example in Oracle

Let's see the command to drop a table from Oracle database.

DROP TABLE sercive_emp;

SQL DROP TABLE Example in Microsoft SQLServer

Let's see the command to drop a table from SQLServer database. It is same as MySQL.

DROP TABLE production_emp;