Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mikebird
Aged Yak Warrior
529 Posts |
Posted - 2008-08-05 : 14:35:44
|
| How do I set up a column to add incremental_by_1 INT values to each new row automatically? Not uniqueidentifier - just 1, 2, 3. Do I need to set up a trigger, or constraint, or put it in the table definition? It's been weeks since I did it. This column will be relied on by many other tables as a reference ID...Thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2008-08-05 : 14:40:43
|
| Look up IDENTITY in BOLCREATE TABLE a(aCol int IDENTITY(1,1)) will do the trickJim |
 |
|
|
|
|
|