13 January 2015

How To Reset the 'Primary Key' To 1 After Deleting All The Rows On The Table

I've been testing a couple of samples for our project before we deploy it to production.

One of my developers asked me how could we reset the Primary Key to 1 after we deleted all the samples (rows) on the table?

A very short script helped us in doing so:

TRUNCATE TABLE tbl_SampleTable

No comments:

Post a Comment