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
Why is normalization important?
What are local and global variables and their differences?
What are the two virtual tables available at the time of database trigger execution?
What is function and procedure in pl sql?
what are the different type of normalization? : Sql dba
What is the largest value that can be stored in a byte data field?
how to select unique records from a table? : Sql dba
What is the best free sql database?
how to drop an existing view in mysql? : Sql dba
Do ddl statements need commit?
what are the advantages of sql ? : Sql dba
Can pl sql procedure have a return statement?
What does count (*) mean?
How do you explain an index number?
Differentiate between % rowtype and type record.