Hi., here I would like give you explain a small difference what i have found between these two.

When we delete the data using delete command like DELETE FROM <TABLE NAME>.
Then all the records will delete from that table. but it an non logged operation. It will not effect to auto increment option.
Suppose we an auto increment option to our table for a primary key field. Let us take it as Id. So if we have data up-to id = 5 that means 5 records. if We delete the data using DELETE command and if we again enter the data into the table then it will the new id will be 6 only it will not start from the first. so the delete command will not effect to this field.

But when we truncate command we will have a new id from "1" . So this is called a logged operation.
Here in the below link you will find some more stuff of this issue.

Just Click Here

Share it


Post a Comment