What is DROP Command?
DROP command in SQL is used to delete a whole database or a table.
DROP statement deletes objects like an existing database, table, index, or view.
Syntax
DROP object object_name ;
DROP and TRUNCATE in SQL
DROP and TRUNCATE in SQL remove data from the table. The main difference between DROP and TRUNCATE commands in SQL is that DROP removes the table or database completely, while TRUNCATE only removes the data, preserving the table structure.
Let’s understand both these SQL commands in detail below: