Compare and contrast TRUNCATE and DELETE for a table.

Answers were Sorted based on User's Feedback



Compare and contrast TRUNCATE and DELETE for a table...

Answer / santosh

Basically truncate is a DDL and Delete is DML. You can use
delete to remove rows depending on certain criteria and it
generated redo logs and can be rolled back before you
commit the transaction, Where as the truncate is used to
remove all the data in the table. Once you execute this
command u can not rollback this transaction.and commit is
not required for the truncate statement

Is This Answer Correct ?    10 Yes 0 No

Compare and contrast TRUNCATE and DELETE for a table...

Answer / taral desai

truncate is faster then delete... truncate don't generate
rollback. truncated data can't be recovered

Is This Answer Correct ?    3 Yes 0 No

Compare and contrast TRUNCATE and DELETE for a table...

Answer / amsu

Truncate is a DDL and delete is a DML command. Once you
truncate a table you cannot rollback where as you can
rollback from the delete command. When you truncate a
table it release the space and it resets the highwater
mark. Delete won't release the space and it won't resets
the highwater mark.

Is This Answer Correct ?    3 Yes 0 No

Compare and contrast TRUNCATE and DELETE for a table...

Answer / sridhar

truncate and delete are deltes all rows in the table but truncate is much faster than delete.
and if u delete row in the delte deletion of each gets logged in the transaction log.
truncate there is no way to log in transaction log

Is This Answer Correct ?    2 Yes 0 No

Compare and contrast TRUNCATE and DELETE for a table...

Answer / ramesh

Truncate is to delete the entire data of any table .does not
have criteria deletion
where as Delete can do that job
However Deleted blocks still persists and have to be
shrinked .otherwisem You still feel the Deleted Recs while
you Query Against

Is This Answer Correct ?    1 Yes 0 No

Compare and contrast TRUNCATE and DELETE for a table...

Answer / kishore

truncate removes all the rows from a table
it can't be rollback
delete removes all /specific rows from a table
it can be rollback
drop removes whole table

Is This Answer Correct ?    1 Yes 0 No

Compare and contrast TRUNCATE and DELETE for a table...

Answer / monal

IN MSSQLSERVER TRUNCATE RESETS IDENTITY VALUE OF COLUMN
WHILE DELETE DOESN'T RESETS IDENTITY VALUE OF COLUMN

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB Administration Interview Questions

i had backup last manday.now i need back monday to now ..how do get backup?

3 Answers   Infozech, Wipro,


How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?

0 Answers  


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1 Answers  


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

3 Answers  


How do you troubleshoot errors in a sql server agent job? : sql server DBA

0 Answers  


How do you recover a datafile that has not been physically been backed up since its creation and has been deleted. Provide syntax example.

4 Answers  


What is the recommended interval at which to run statspack snapshots, and why?

1 Answers  


How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?

1 Answers  


how can you get actual data change values from previous transactions in oracle?

0 Answers   Oracle,


How would you go about generating an EXPLAIN plan?

2 Answers  


CTS int questions: 1.Temperory tablespace corrupted,how to resolve?If you need to recover? 2.In tablespace begin backup mode,Its possible to add the datafile? 3.How to partition the table using Hash partioning,what happened internally? 4.During rman backup,some files are missing Rman will continue the backup? 5.what are the errors occurs frequently? 6.which join method is best?why? 7.how to solve deadlock errors? please reply anyone.... regards siva

2 Answers   CTS,


What is replication? : sql server DBA

0 Answers  


Categories