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

Where in the Oracle directory tree structure are audit traces placed?

2123


Which is the best institute in Hyderabad to learn OBIEE and DataStage?Please tell me faculty name also

1839


Explain how to close periods in ar. : oracle accounts receivable

707


What is the importance of batch source set up in ar? : oracle accounts receivable

714


QUESTION IS THAT DURING UPLOADING DATA IN PROD SERVER,OUR EQUIPMENT TAG NUMBERS ARE NOT MATCHING WITH SAP TAG NUMBERS SO DUE TO THIS WE ARE FACING PROB, BECAUSE WHENEVER ALARM IS COMING FROM SCADA DUE MISMATCH THE NOTIFICATION IS NOT CREATED IT IS GIVING ERROR. PLEASE SUGGEST THE METHOD SO THAT THE TAG NUMBERS OF BOTH (SCADA EQUIPMENT AND SAP EQUIP) SHOULD CONCIDE.OTHERWISE WE HAVE TO GO FOR LONG PROCESS EITHER BY INTERFACE TABLE OR BY EXPORTING ALL DATA AND MAKING RIGHT CHANGES.DO YOU HAVE ANY SHORTCT METHOD PL WRITE ME. THANKS

1645






can u pls share responsibilities for production how to environment in odi?and how to generate report ?

1902


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

1544


What is the meaning of "Modulus" and "Alignment" in a datafile. Data file might be from any database. Data file is created through unloading data from a table. So, while loading this data into my table, I need to use these keywords. Could any one can help me regarding this?

1592


what are the API of GL,PO,AP

1772


What is the Difference between the Person_Type_id column in the per_all_people_f and per_person_type_usages_f

3985


HOW TO SAVE UNIVERSES AND DOCUMENTS IN THE REPOSITORY?

1585


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

6021


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

1842


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

575


How to clone the database using RMAN back

1615