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

How to determine the service pack currently installed on SQL Server?

1 Answers  


Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down? : sql server DBA

0 Answers  


What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

2 Answers  


what is the difference between catalog & nocatalog?

3 Answers   CSC,


what is rebuild index??

2 Answers   IBM, Sapient,






Can you take Image Backups using RMAN? . Can you use Backupsets created by RMAN with any other utility

1 Answers   Tech Mahindra,


If we issue alter database begin backup. What happens to database?

2 Answers  


when we login sql editor using username and password then it says this error "could not resolve service name" then what can we do at client side.( here thing is tnsnames.ora file is ok till yesterday and worked well, but now it giving error.

0 Answers  


A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?

0 Answers  


What is the difference between the 2 operating modes of database mirroring? : sql server DBA

0 Answers  


why do we give pctfree and pctused in create table statement?

1 Answers   CTS,


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

0 Answers  


Categories