Auto increment will restart from 1?? | Sololearn: Learn to code for FREE!


Auto increment will restart from 1??

suppose a table contains an auto increment column(ABC) and has 20 rows of values. now I delete all data from the table. What will be the value of ABC when we insert a new row? will it again start from 1?

7/4/2018 4:40:45 PM

Arindam Mondal

5 Answers

New Answer


Toni Isotalo thanks. can you please see my anther question? I specified it with more details there


No it continues from the last id. You can recreate the table or use AUTO_INCREMENT = 1 to restart it.


you can use AUTO_INCREMENT=1. that must work normally


otherwise you can try: USE «databasename»; GO DBCC CHECKIDENT ('«tablename»'); GO


Serigne Fallou DIAGNE thanks. can u please follow the upper link and visit