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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Non-Identitiy Autoincrementing column in SQL-Server?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-08 : 23:49:33
Dave writes "I was wondering if it is possible to have an autoincrementing column (for instance, a counter field that simply increments by 1 for each newly inserted record), that is not setup as a primary key field?

Specifically, what I'm looking for, is the ability to use some method to autoincrement the counter field that would be placed in the default value column during table design view...similar to using GetDate() in the default value of a date/time stamp field. Is there a simple way without having to use T-SQL as I'm doing now?

BTW, I'm using SQL Server 7.0 SP-2 on NT Server 4.0 SP-6.

thanks,
Dave"
   

- Advertisement -