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
How to run pl sql program in mysql?
What are joins in sql?
What is output spooling in sql*plus?
How long it takes to learn pl sql?
How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?
Is sql a case sensitive language?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
What is pl/sql table? Why it is used?
Does sql use python?
What is the purpose of primary key?
How do you modify a table in sql?
What is the basic form of sql query?
What is the difference between clustered and non-clustered indexes?
What are literals in sql server?
How to write pl sql program in mysql command prompt?