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 not null constraint?
A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?
How to list all field names in the result set using mssql_field_name()?
what is raid? : Sql server database administration
Can a cursor be updated? If yes, how you can protect which columns are updated?
What is transaction server distributed transaction?
What are types of subqueries?
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?
How to create a view on an existing table in ms sql server?
What is open database communication (odbc)?
Where cross join is used?
When I delete any data from a table, does the sql server reduce the size of that table?
How to find index size for each index on table?
What is collation sensitivity?
What language is sql server written in?