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
Is primary key clustered index?
What is the usage of the distinct keyword?
Is merge a dml statement?
What is query execution plan in sql?
how to create a new table by selecting rows from another table in mysql? : Sql dba
how to use regular expression in pattern match conditions? : Sql dba
What are some predefined exceptions in pl/sql?
Is time a data type in sql?
Explain isolation levels. : Transact sql
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
what is the difference between undefined value and null value? : Sql dba
What is trigger in flip flop?
What does inner join mean?
Explain exception handling in pl/sql?
How does sql developer connect to oracle database?