• Notice regarding image hosts and attachments. See here.

How to get incremental counter in SQL2005

Soldato
Joined
11 Feb 2004
Posts
4,532
Location
Surrey, UK
When using SQL 2000 is was very easy to assign an atrribute to a field which meant each time a new record was added it would increment by 1.

I can't seem to find this in 2005? Any ideas welcome :)
 
Using Management Studio, you need to set the Identity property to true on the column, and optionally adjust the Identity Seed and Indentity Increment properties.
 
Last edited:
Back
Top Bottom