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