Answer Posted / wasimali
1) Delete command maintained the log files in each deleted row but truncate command do not maintained the log files for each deleted row but maintain the record for DE-allocation
of data-pages in the log files
2)Delete is a DML command and truncate is a DDL command.
3)Trigger is fired in case of delete command only but they are not fired when truncate command is used.
4)you can used where clause in case of delete command use to delete a particular row,
but you can not use where clause in case of truncate command use to delete a data from rows.
5) Truncate command reset the identity property to its initial values whereas delete command can not reset its identity property of its column.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a data source or ds? : sql server analysis services, ssas
How to retrieve error messages using mssql_get_last_message()?
What are the disadvantages of indexes?
Equi join and non equi join is possible with sql server?
Explain what is use of dbcc commands?
What is table level trigger?
What is the difference between Clustered and Non-Clustered Index?
What are the basic functions for master, msdb, model, tempdb databases?
explain extended properties
How to change parameter value inside the report?
Do you know what guidelines should be followed to help minimize deadlocks?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
What are views used for?
What are data files?
what is the difference between a primary key and a unique key? : Sql server database administration