What is difference between TRUNCATE & DELETE?
Answer Posted / swapnareddy
Main Differences between Truncate and Delete:
Truncate:
1:Truncate removes all records but using this we cannot
remove a particular record.
2:Truncate is ddl command(data definiton language command)
3:Rollback cannot be done when we use this command.
4:Truncate cannot fire a trigger.
Delete:
1:delete can remove all records or a particular record.
2:delete is a dml command(data manipulation language command)
3:rollback is possible when we use this command.
4:delete can fire a trigger
Is This Answer Correct ? | 19 Yes | 1 No |
Post New Answer View All Answers
What is the difference between partitioning and sharding?
Is join same as left join?
how mysql optimizes distinct? : Sql dba
Is it possible to read/write files to-and-from PL/SQL?
What is sql partition function?
how to select first 5 records from a table? : Sql dba
Why triggers are used?
Why is partition used in sql?
What is a pl/sql block?
Explain the purpose of %type and %rowtype data types with the example?
What is substitution variable?
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
What is numeric function sql?
What is the advantage of index in sql?
Why do we need a foreign key?