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

In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?

0 Answers  


1)how to Take Backup in sql server 2005 from Flash Drive

1 Answers  


what are the differences of where and if in SAS?

0 Answers  


what is meant by gateway

1 Answers   IBM,


How do you open a cluster administrator? : sql server DBA

0 Answers  






what is the last version,the release date of that version and fix pack of ibm db2 udb?

0 Answers  


What authentication modes does sql server support? : sql server DBA

0 Answers  


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

2 Answers  


wat is global index and local indes

1 Answers   Oracle,


How to bind a cobol module to a given job? I am not able to understand this concept.Can anyone help me out as how to carry out this task?

0 Answers   EDS,


. I have my backup RMAN script called "backup_rman.sh". I am on the target database. My catalog username/password is rman/rman. My catalog db is called rman. How would you run this shell script from the o/s such that it would run as a background process?

0 Answers  


Give the stages of instance startup to a usable state where normal users may access it.

1 Answers  


Categories