
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
What is MySQL DROP command used for?
As the name explains, it is used to completely remove the table from the database.
Syntax
Drop table table_name;
Example
mysql> Drop table Student; Query OK, 0 rows affected (0.09 sec)
The query above completely removes the ‘Student’ table from the database. We can observe as MySQL returns an error message after running the following query −
mysql> Select * from Student; ERROR 1146 (42S02): Table 'query.student' doesn't exist
- Related Articles
- What is MySQL TRUNCATE command used for?
- What is MySQL DELETE command used for?
- What is the significant difference between MySQL TRUNCATE and DROP command?
- MySQL command line client for Windows?
- MySQL command for display current configuration variables?
- MySQL command for displaying current configuration variables?
- What is the command used to register gecko driver in Selenium?
- What MySQL returns when we remove all the columns from a table by using ALTER TABLE command with DROP keyword?
- What is Air Drop?
- What is JavaScript used for?
- MySQL BIT_LENGTH() function is used for which purpose?
- For timestamp, which datatype is used in MySQL?
- Command Options for Connecting to the MySQL Server
- What is the difference between MySQL TRUNCATE and DELETE command?
- What is MySQL CREATE command? How can we create both database and table with this command?

Advertisements