Search this blog

Wednesday, December 29, 2010

Truncate Vs Delete

Truncate

Delete

Truncate Table <Table Name>

Delete from <Table Name> Where <Condition>

Cannot use Where Condition

It is possible

It Removes all the data

It deletes specified data if where condition exists.

Faster in performance wise, because it doesn't keep any logs

Slower than truncate because, it keeps logs

Rollback is not possible

Rollback is possible

2 comments:

  1. Hi Babu,
    Its nice one, I think there is one more major difference.

    Truncate will reset identity column in target table but delete will not.

    ReplyDelete
  2. thi is helep me thank for special

    ReplyDelete