What is the difference between DELETE and TRUNCATE commands?

Total Post:15

Points:75
 211  View(s)
Ratings:
Rate this:
  1. Post:15

    Points:75
    What is the difference between DELETE and TRUNCATE commands?

    Mostly DELETE command is used to remove rows from the table, and WHERE clause can be used for conditional set of parameters. Here Commit and Rollback operation can be performed or used after delete statement.

    Into the TRUNCATE command removes all rows from table. And the Truncate operation cannot be rolled back. In other word, Commit and Rollback operation can't be performed in TRUNCATE operation.

    Delete command is used to delete a row in a table. Truncate is used to delete all the rows from a table.
    You can rollback data after using delete statement. You cannot rollback data.
    It is a DML command. It is a DDL command.
    It is slower than truncate statement. It is faster.

Answer