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
 General SQL Server Forums
 New to SQL Server Programming
 how to set auto number property in sql server2005

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2006-10-04 : 05:28:23
hi,
here i am trying to create a table in which i want give a property autonumber(i.e increments simultaneously for each new row) to a field.pls tell me the procedure for this in sql server2005

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-04 : 05:37:56
Read about IDENTITY column in BOOKS ONLINE.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2006-10-04 : 07:21:46
In table designer in SSMS, make sure your column doesn't allow NULLs. Then look for the property "identity specification" towards the bottom of the designer and change it to "yes"...that's it!

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page
   

- Advertisement -