- Lean SQL Tutorials
- DDL - Data Definition Language
- DML - Data Manipulation Language
- CREATE Command
- ALTER Command
- USE Command
- DROP DATABASE, DROP TABLE
- TRUNCATE TABLE Command
- SELECT SQL Statement
- INSERT SQL Statement
- UPDATE SQL Statement
- DELETE SQL Statement
- SQL WHERE Clause
- SQL ORDER BY Clause
- SQL GROUP BY Clause
- SQL TOP Clause
- SQL DISTINCT Clause
- SQL LIKE Operator
- SQL IN Operator, NOT IN
- SQL BETWEEN Operator
- SQL AND & OR Operator
DROP Command in SQL – DDL Statements
DROP Command – DDL Statements
The DROP command used to remove the database object from DBMS, and delete the table from database.
Once we use DROP Command for database the database deleted with all the related objects like tables, views and stored procedures.
The DROP Command can not be rollback.
The DROP DATABASE Command Syntax:
DROP DATABASE Databasename
Databasename is the name of database to be dropped.
DROP DATABASE Command Example:
If we want to drop / delete database school, then the statement would be like :
DROP DATABASE School
Above statement drop database School with all the tables, views and stored procedures within it.
If we want to delete table from database then use DROP TABLE command.
The DROP TABLE Command Syntax:
DROP TABLE Tablename
Tablename is the name of table to be deleted.
DROP TABLE Command Example:
If we want to delete Student table permanently from database.
The DROP TABLE Statement would be like :
DROP TABLE Student