DROP TABLE in SQL

DROP TABLE in SQL means that all of the table’s data, structure, constraints, permissions, etc. will be removed from the database.

DROP TABLE command is irreversible, so once a DROP TABLE command is executed for a table, all information about that table will be removed permanently.

SQL DROP TABLE

SQL DROP TABLE statement deletes data and structure of a table from the database.

Similar Reads

DROP TABLE in SQL

DROP TABLE in SQL means that all of the table’s data, structure, constraints, permissions, etc. will be removed from the database....

SQL DROP TABLE Syntax

The syntax to use the DROP TABLE command in SQL is:...

Examples

Let’s look at some examples of the DROP TABLE statement in SQL to understand its working....

Important Points About SQL DROP TABLE

The SQL DROP TABLE statement is used to delete tables in a database, along with all associated data, indexes, triggers, constraints, and permission specifications.The table will be permanently disable, so use this query with caution.Use DROP TABLE IF EXISTS query to prevent errors when dropping a table that does not existWhen dropping a partitioned table, the DROP TABLE statement removes the table definition, all partitions, all data stored in those partitions, and all partition definitions.The DROP TABLE statement can be used to drop temporary tables by including the TEMPORARY keyword.To verify if a table is dropped, you can use the DESC command....

Contact Us