Primary Key in SQL Server

levyuk

Well-known member
Joined
Jun 7, 2004
Messages
313
Location
Wales, UK
Programming Experience
3-5
How do I make an autoincrementing primary key for my tables. I can create the tables and change a column to a primary key but I don't know how to make it autoincrement. And whats the point of typing in a primary key by yourself.
 
Ok I think I found something. Can I use the identity properties of a primary key? I think I can but if anybody knows any different let me know
 
IDentity is correct....

As for your other question about primary keys and punching them in by hand.... we've got several instances of that in our app. Usually they are static tables that we (and only we) have control over. The ID is a PKEy, and must be unique, but we have to control it because we'll use it in the app to pull the record.

Tg
 

Latest posts

Back
Top