My SQLSQL Server

Auto increment start from 1000 in mysql and SQL Server

if you have auto increment field then you can able to change the start index
eg. if you want to set start index 1000 then your auto increment field value should be start from 1000

in my sql there is simple way to set a start index

ALTER TABLE tableName AUTO_INCREMENT = 1000;

In MS-SQL Server there is different way. check the below example

DBCC checkident ('tableName', reseed, 1000)

 

Tags
Show More

Leave a Reply

Your email address will not be published. Required fields are marked *

Close