Delete | Truncate |
---|---|
The DELETE command is used to delete specified rows(one or more | While this command is used to delete all the rows from a table. |
We can use with where clause | It can’t be used with where clause |
It locks the table row before deleting the row | It locks the entire table |
We can rollback the changes. | We can’t rollback the changes |
It is slower than truncate | It is faster than delete |
It is a DML(Data Manipulation Language) command. | While it is a DDL(Data Definition Language) command. |
No comments:
Write comments