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)
Kubernetes
Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...
-
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...
-
With this example you can create pdf and print pdf. If You are using ASP.NET MVC , PDF can be created by using Rotativa Rotativa is a ...
No comments:
Post a Comment
Thank you for visiting my blog