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
Does sql backup shrink transaction log?
How can we implement rollback or commit statement in a trigger?
what is bcp? When does it used? : Sql dba
What are different methods to trace the pl/sql code?
I need a function for a train ticket reservation please answer it thanks in advance
Is left join faster than join?
What are different sql data types?
What is recursive join in sql?
What is sqlca in db2?
what is sql server agent? : Sql dba
What is the command used to fetch the first 5 characters of a string?
How to sort the rows in sql.
How do I view a sql database?
Can you join a table to itself?
what is the command used to fetch first 5 characters of the string? : Sql dba