I need to know what keyword v should use for autoincrement in the table with primary key in sql 2005
+1, **IDENTITY (100,5)** to start at 100 and increment by 5, but I bet that is the default
KM
2010-02-19 22:38:07
Default is seed = 1, increment = 1 ... so equivalent to above is [ID] INT IDENTITY(1,1) - though the PRIMARY KEY part is certainly not a required part of the syntax... you may just as easily want your PK on a column other than the IDENTITY column (as with many things, it depends).
Aaron Bertrand
2010-02-19 22:57:09
@Aaron: Primary key need was part of the question :D
Hogan
2010-02-19 23:00:43