What is difference between TRUNCATE & DELETE?

Answer Posted / swapnareddy

Main Differences between Truncate and Delete:
Truncate:
1:Truncate removes all records but using this we cannot
remove a particular record.
2:Truncate is ddl command(data definiton language command)
3:Rollback cannot be done when we use this command.
4:Truncate cannot fire a trigger.
Delete:
1:delete can remove all records or a particular record.
2:delete is a dml command(data manipulation language command)
3:rollback is possible when we use this command.
4:delete can fire a trigger

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Determine if oracle date is on a weekend?

544


Is sql between inclusive?

578


How do I turn a list into a table?

495


What does 0 mean in sql?

516


How to display Row Number with Records in Oracle SQL Plus?

582






What is the difference between Union and Union all. Which is faster.

839


How is data stored in sql?

543


Explain scalar functions in sql?

565


How many row comparison operators are used while working with a subquery?

523


What is difference between sql function and stored procedure?

496


Compare sql & pl/sql

598


What is the difference between union and union all command?

532


What does partition by mean in sql?

502


what does the t-sql command ident_incr does? : Transact sql

587


What is scope and visibility in PL/SQL?

586