LTY83
asked on
How do I set a start auto number for a sql server table
I have a table that has a n INT column that is used as a unique id, i was curious how I could have that column start at a number like 300,000 for example instead of defaulting to 1 when there is no data in teh table?
Thanks!
Loren
Thanks!
Loren
DBCC CHECKIDENT (urColumn, RESEED, 300000)
ASKER
should I run that in query analyzer?
yes
ASKER
what would the full statement look like? DBCC CHECKIDENT(mytable.mycolum n, RESEED, 300000) ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ahh i see, thanks!
sorry for my first mistake.. Its 11.44 pm here .. need a good sleep :)
just 1 note (points for aneeshattingal):
when you create the table, you can specify the identity seed:
create table mytable ( identity_field int identity(300000, 1), <other fields> )
when you create the table, you can specify the identity seed:
create table mytable ( identity_field int identity(300000, 1), <other fields> )