Delete vs Drop

Posted September 12, 2022 by Rohith and Anusha ‐ 1 min read

Delete is a Data Manipulation Language command, DML command and is used to remove tuples/records from a relation/table. Whereas Drop is a Data Definition Language, DDL command and is used to remove named elements of schema like relations/table, constraints or entire schema.

Following are the important differences between Delete and Drop.

KeyDELETEDROP
PurposeDELETE Command, removes some or all tuples/records from a relation/tableDROP Command, removes named elements of schema like relations/table, constraints or entire schema.
LanguageDELETE is DML.DROP is DDL.
ClauseWhere clause is used to add filtering.No where clause is available.
RollbackDelete command can be rollbacked as it works on data buffer.Drop command can’t be rollbacked as it works directly on data.
Memory SpaceTable memory space is not free if all records are deleted using Delete Command.Drop command frees the memory space.
ProblemDELETE command may face shortage of memory.DROP Command may cause memory fragmentation.
InteractionSQL directly interacts with database server.PL/SQL does not directly interacts with database server.
OrientationSQL is data oriented language.PL/SQL is application oriented language.
ObjectiveSQL is used to write queries, create and execute DDL and DML statments.PL/SQL is used to write program blocks, functions, procedures, triggers and packages.
quick-references blog delete drop differences

Subscribe For More Content