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

+2

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

0

Toni Isotalo thanks. can you please see my anther question? I specified it with more details there https://www.sololearn.com/discuss/1386800/?ref=app

+5

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

+1

you can use AUTO_INCREMENT=1. that must work normally

+1

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

0

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