How to Drop a Table in SQL Database: SQL MySQL PostgreSQL Oracle MS SQL Server Operators: DROP TABLE Table of Contents Problem: Example: Solution: Discussion: Problem: You want to remove a table from a database. Example: We would like to remove the table called product from the database Solution: DROP TABLE product; Discussion: If you want to remove an existing table from a database, use the statement DROP TABLE with the name of the table. In this example, we first wrote the command DROP TABLE followed by the table name product. That’s all you need to do. This command removes the table’s data, the table structure, and other objects associated with the table (e.g. indexes, permissions, constraints, and triggers). Keep in mind that if there are tables with foreign keys that reference the soon-to-be deleted table, you should first drop these keys or remove the relationship between tables. Recommended courses: The Basics of Creating Tables Data Types in SQL SQL Constraints Recommended articles: What Is the Benefit of Foreign Keys in SQL? How to Create a Table in SQL An Overview of PostgreSQL Data Types Understanding Numerical Data Types in SQL Comparing TRUNCATE TABLE, DELETE, and DROP TABLE in SQL What Is the DELETE Statement in SQL? See also: How to Remove a Primary Key in SQL How to remove a unique constraint in SQL? How to Delete a Column in SQL How to Delete a Foreign Key Constraint in SQL How to Delete a Row in SQL Subscribe to our newsletter Join our monthly newsletter to be notified about the latest posts. Email address How Do You Write a SELECT Statement in SQL? What Is a Foreign Key in SQL? Enumerate and Explain All the Basic Elements of an SQL Query