MySQL Database

MySQL DROP TABLE

The MySQL DROP TABLE Statement

The DROP TABLE statement is used to drop an existing table in a database.

Syntax

				
					DROP TABLE table_name;
				
			

Note: Exercise caution when lowering a table. All of the data contained in a table will be lost if it is deleted!

MySQL DROP TABLE Example

The following SQL statement drops the existing table “Shippers”:

Example

				
					DROP TABLE Shippers;
				
			

MySQL TRUNCATE TABLE

A table’s contents can be removed using the TRUNCATE TABLE statement, but the table itself cannot be removed.

Example

				
					TRUNCATE TABLE table_name;
				
			
Share this Doc

MySQL DROP TABLE

Or copy link

Explore Topic