What is the difference between DELETE, TRUNCATE, and DROP?

Answer Posted / hr@tgksolutions.com

• DELETE:
o Deletes specific rows from a table.
o Can have a WHERE clause.
o DML command (can be rolled back).
• TRUNCATE:
o Deletes all rows from a table.
o Faster than DELETE (does not log individual row deletions).
o DDL command (cannot be rolled back).
• DROP:
o Removes a table entirely (schema + data).
o DDL command.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find 3rd highest salary of an employee from the employee table in sql?

838


How do I write a cron which will run a sql query and mail the results to agroup?

745


Can one improve the performance of sql*loader? : aql loader

807


Can dml statements be used in pl/sql?

803


What are the string functions in sql?

756


Why do we need cursors in pl sql?

752


What is difference between procedure and trigger?

717


What is the most important ddl statements in sql are?

754


what are the difference between clustered and a non-clustered index? : Sql dba

770


What is difference between my sql and sql?

752


What are pl sql procedures?

736


How to get list of all tables from a database?

879


What is the need of a partition key?

755


What is difference between cursor and trigger?

795


What is data type in sql?

757