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
what is database replicaion? What are the different types of replication you can set up in sql server? : Sql server database administration
While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?
What is the purpose of update statistics and scope_identity() function?
Explain the difference between function and stored procedure?
How to use "begin ... End" statement structures in ms sql server?
what are the types of indexes? : Sql server database administration
How to create a new schema in a database?
When is the use of update_statistics command?
How we create SQL Server 2005 Reporting Services ? Give me Sample
How to create a dynamic cursor with the dynamic option?
Mention the differences between substr and charindex in sql server.
Why we need to use secondry database file? though, we can do same work using primary database file also.
How to create dbo table in sql server?
If we delete pack Spec what will be the status of pack Body ?
What is the difference between createstatement and preparedstatement?