What's the difference between DELETE TABLE and TRUNCATE
TABLE commands?

Answer Posted / nageswarao

1.truncate is DDL cmd.where as delete is a DML cmd.
2.truncate is similar to delete command without no
condition.
3.when u use truncate it restructure the table,wthout
bothering of data it deletes entire records.
but,delete is a logged transaction.before delete
records it copies to transaction log.then removes.
4.truncate take less time than delete in execution.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

602


What are the differences between char and varchar in ms sql server?

587


how to overcome kernel isssues

1184


When do you think a developer should use sql server-based cursors?

530


What is the difference between a function and a trigger?

581






Please explain go command in sql server?

607


What is updatable resultset?

522


Explain the different types of joins?

578


Define self join in sql server joins?

531


Can an entity have two primary keys?

541


What are indexes in sql?

586


What is store procedure? When do you use?

534


What is the use of RDBMS?

598


Explain about Views?

614


Can we use where clause with group by?

526