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
what is the difference between myisam static and myisam dynamic? : Sql dba
In what condition is it good to disable a trigger?
what is a foreign key ? : Sql dba
1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins
What is substitution variable in pl sql?
Explain the components of sql?
Does sql full backup truncate logs?
Is progress software supports to ( pl/sql )?
What is sql basics?
How do I restart sql?
What does := mean in pl sql?
Inline the values in PL/SQL, what does it mean.?
what is the difference between join and union? : Sql dba
What is the cause of mutating table error and how can we solve it?
How to select random rows from a table?