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

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

1602


What do you mean by hz_ in customer tables? : oracle accounts receivable

627


I need a Technical evaluation between Oracle and SAP ? please do a need ful.

1480


What view would you use to determine free space in a tablespace?

1762


i am pursuing mca and i want to do oracle apps technical in hydrabad, plz guide me tne best institue in hydrabad those have excellent knowledge in oracle apps.

1837






8. Supporting AP, AR and GL?

1798


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

2043


Explain prerequisites and post activities of oracle database installation

1604


What is the difference between conversions and interfaces? : oracle accounts receivable

634


Differentiate between earned discounts and unearned discounts? : oracle accounts receivable

654


WHAT ALL DIFFERENT KIND OF FUNCTIONS AVAILABLE WHILE DESIGN UNIVERSES?

1625


What are the advantages of operating a database in ARCHIVELOG mode over operating it in NO ARCHIVELOG mode in Oracle?

635


what is the link between suppliers and banks in ap module in oracle apps? And also query?

2006


Explain about party and customer in ar : oracle accounts receivable

707


Difference between negative and positive adjustments : oracle accounts receivable

611