[dba-SQLServer] Is it possible

Stuart McLachlan stuart at lexacorp.com.pg
Fri Feb 25 22:03:46 CST 2011


Basically, yes but you have lots of flexibility.

If you change the column's Identity Seed to be larger than the current largest PK, it will start 
from that instead.  (If it is smaller, it will use the current largest PK as it's start point).

You can also set the size of the Increment, so you can have your PKs going up by 10 each 
time if you want :-)

Just right click on the column, select Modify, click on Identity Specification in the lower panel 
and it will expand to show the various settings.

-- 
Stuart

On 25 Feb 2011 at 22:24, jwcolby wrote:

> Does it just figure out the last value and start from there?
> 
> John W. Colby
> www.ColbyConsulting.com
> 
> On 2/25/2011 10:15 PM, Stuart McLachlan wrote:
> > Hi John,
> >
> > Yes, unlike Acces, in SQL Server you can switch autoincrement on and
> > off regardless of whether or not there are existing records in the
> > table.
> >
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 






More information about the dba-SQLServer mailing list