what is the difference between TRUNCATE and DELETE command
in SQL

Answer Posted / pavan_1981

truncate is ddl command.its faster than delete as it doesnt
have go through the rollbacks etc.truncate being a ddl is
auto commit.we can only truncate the whole table(cant use
where clause).once table is truncated we cant rollback the
changes.when a table is truncated the memory occupied is
released.that id the water mark is adjusted.

delete is a dml command and can be rolled back.is slower
than truncate as it is dml has to go through rollback
segments etc.we can use where clause with delete.when a
table is deleted memory occupied is not released ans also
the water mark is not adjusted.

Is This Answer Correct ?    153 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

if i write the procedure.. and other person make the changes in that code then where i find who is changing my procedure

1563


I've got a database 10g and Form version 5.0 but unable to connect. Does Oracle 10g database supports form 4.5

2066


What is auto accounting what are the steps for setting up auto accounting? : oracle accounts receivable

724


What is the sql query to find the employee who has Nth maximum salary?

4308


Hey i want to join oracle apps so will you pls tell me that which institute is best in hyderabad.

1862






Explain prerequisites and post activities of oracle database installation

1625


Give two methods you could use to determine what DDL changes have been made.

6046


Differentiate between unidentified receipt, unapplied receipts and on account receipts? : oracle accounts receivable

1257


What is the difference between oracle media recovery and crash recovery?

690


IS IT POSSIBLE TO CREATE REPORTS FROM DIFFERENT UNIVERSES IN ONE DOCUMENT?

1636


hi iam kavya, i completed Oracle11i(finance module), i do not know how to face the interview questions please adivese me

1787


Difference between transaction type and transaction sources. : oracle accounts receivable

587


what are the interface and api table for receipts conversion in oracle receivables? : oracle accounts receivable

649


What is the use of lockboxes? Steps for lock box : oracle accounts receivable

744


How would you determine what sessions are connected and what resources they are waiting for?

1620