SQL Server Definitions Part - 2
What is difference between delete and truncate command?
- Delete commands removes rows from a table. Delete physically removes rows one at a time and records each deleted row in the transaction log. Truncate table command removes all rows from a table without logging the individual row deletes.
- Truncate table command runs faster than delete command.
- Truncate command will reinitialize identity columns of a table where as delete command will preserve the identity count. Since
- Truncate command is not logged it will not and cannot activate a trigger. Truncate command cannot be used with tables referenced by foreign keys.
What do you mean by DBCC statements?
DBCC stands for Database Console Command statements. These statements are used to check the phsyical and logical consistency of database. Following are the categories of DBCC statementss -
- Status statements
- Miscellaneous statements
- Maintenance statements
- Validation statements
Labels: SQL Server, T-SQL


0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home