What is difference between TRUNCATE & DELETE?
Answer Posted / oracle_tigress
difference between truncate and delete
1.truncate removes rows in one execution..delete removes
rows one by one so truncate is fast..
2.truncate does not creates logs and hence canot be
rolledback and hence is a DDL stmt..DELETE creates rollback
segment hence can be rolled back and hence is a DML stmt.
3.truncate doesnot allow for conditional remove of records
(all records has to remove) DELETE allows conditonal remove
of records(where cluase etc can be used.)
4.triggers are not fired on truncate stmt but trgieers are
fired on DELETE stmt..
| Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
Explain the working of primary key?
What is dense_rank?
How to avoid duplicate records in a query?
what are the 'mysql' command line arguments? : Sql dba
Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql
How many sql statements are used?
What are the steps for performance tuning.
What are the types of views in sql?
How do you break a loop in pl sql?
What are the sql versions?
Why select is used in sql?
How do you delete duplicates in sql query using rowid?
Explain table and field in sql?
What do you mean by “trigger” in sql?
What is the purpose of the sql select top clause?