| 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...
-
Using ng bind directive: <html> <script src="angular.min.js"></script> <body> <div ng-a...
-
Visual Studio 2015 installation will not have Crystal Reports and hence we need to install it you can download it from the following locat...
-
First create a Data Set Click on Add Button It prompts for a message saying as Click on Yes Button Click on Table Adapter. Click on New Conn...
No comments:
Post a Comment
Thank you for visiting my blog