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

Answer Posted / nashiinformaticssolutions

• 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

Is primary key clustered index?

686


What is the usage of the distinct keyword?

889


Is merge a dml statement?

729


What is query execution plan in sql?

773


how to create a new table by selecting rows from another table in mysql? : Sql dba

753






how to use regular expression in pattern match conditions? : Sql dba

730


What are some predefined exceptions in pl/sql?

744


Is time a data type in sql?

646


Explain isolation levels. : Transact sql

744


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

751


what is the difference between undefined value and null value? : Sql dba

779


What is trigger in flip flop?

729


What does inner join mean?

756


Explain exception handling in pl/sql?

725


How does sql developer connect to oracle database?

737