Delete Command | Truncate Command |
Delete command supports where clause and hence it can be used for deleting only | It does not support where clause and hence, it can be used only when you want to delete all rows from the table. |
Delete command deletes rows one by one | It deletes the rows page by page Hence deleting all the rows from table, will be fast with truncate , compared to Delete |
When there is identity on a table and you delete all rows the table using Delete than the current value of identity will not be reset to it seed | When there is identity on a table and you delete all rows from table, using truncate command, then the current value of identity will be reset to it seed. |
Slow in execution | Fast in execution |
Restoring is possible | Restoring is not possible |
Delete command will not deallocate the memory after deleting the rows, hence delete command comes under data manipulation language | It will deallocate the memory after deleting the data by keeping one extend for the table, hence truncate comes under data definition language |
| |
Wednesday, May 14, 2014
Delete and Truncate Command
Subscribe to:
Post Comments (Atom)
Python -3
Lists It is used to store Collection of data. Lists are created using square brackets: List Items Order cannot be changed. It can have dup...
-
Super aggregates: Are used to calculate aggregates of aggregates There are two super aggregates functions Roll Up Cube When there is a singl...
-
SOLID principles allows object oriented programming implementation in an efficient better way into project development S-->Single R...
-
Visual Studio 2015 installation will not have Crystal Reports and hence we need to install it you can download it from the following locat...
No comments:
Post a Comment
Thank you for visiting my blog