Thursday, September 13, 2012

Difference between Delete and Truncate Command

DELETE Command
  • Delete Command always delete data from TABLE on basis of WHERE command specified in the SQL Query
  • Delete Command doesn't resets the identity coulmn of the Table
  • Delete command can be rolled back
  • Delete comand is DML(Data Manipulation Language) statement.
  • Delete command is slower as compared to Truncate command
  • Delete command can initiate the TRIGGER

  • Truncate command deletes entire table
  • Truncate command resets the identity column of the table
  • Truncate command cannot be rolled back
  • Truncate command is DDL(Date Definition Language) statement.
  • Truncate command is faster as compared to Delete command
  • Truncate command cannot initiate the TRIGGER

No comments:

Post a Comment