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 write a query to show the details of a student from students table whose
What is oracle and pl sql?
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What is query syntax?
Is sql pronounced sequel or sql?
What are the key differences between SQL and PL SQL?
how to use case expression? : Sql dba
How many sql statements are used?
What is cursor and why it is required?
How we can update the view?
what is query cache in mysql? : Sql dba
What is a common use of group by in sql?
Write the alter statement to enable all the triggers on the t.students table.
What are stored procedures in mysql?
What is the difference between functions, procedures, and packages in pl/sql?