Monday, February 20, 2012

MS SQL 05 auto increment

Hello,

Firstly Hello to everyone I'm new the forum and fairly new to .net

I'm working on web datbase application using visual studios 05 and MS SQL05 I've used 2003 (briefly) before but 2005 is very new to me.

To my problem I download the GUI interface from microsoft so I can now setup a local database and do my own testing.

I have created the table and fields with in it however on a particular table i have made a primary Key and left it as an INT but I would like to set it as auto increment ! I dont know how to select that option as i was used to mysql way of doing things or does this have to be done as a stored procedure ?

Any assistance much appreciated.

in the management studio you can right click on the table name and click on "modify table" then in the right pane select the column you want to set autoidenty on to and in the bottom pane check the Identity property.

No comments:

Post a Comment