A Coder
A Coder

Reputation: 3056

Customize starting id in SQL Server auto-increment column

I have to start my auto-increment column of my table in SQL Server from 1000. In default it starts from 1. Now I have to customize that.

Is that possible??

Upvotes: 0

Views: 372

Answers (1)

Oleg Mikheev
Oleg Mikheev

Reputation: 17444

I think in create table the syntax is

column_name data_type identity(startingValue(seed), increment)

so that in your case it's

create table table_name ( id int identity(1000 , 1) )

Upvotes: 1

Related Questions