• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

SQL Server 2005 nub question

Jeff7181

Lifer
How do I create an autonumber column in a table in SQL Server 2005?
I want to use it as a primary key, but don't want to have to enter it or use code in a front end of the the database to enter it. I want the database to do it by itself if possible. Is there an easy way, or would it be better to have a front end application used for data entry do that?
 
Make it an identity field. When you have focus on the field in design view, you have to look at the column properties. There's something called Identity specification. Expand it, and change where it asks Is Identity to yes. It will automatically fill in in increment and seed values.
 
Back
Top