Monday, March 12, 2012

Identity or unique identifier

Hi there,
I'm new to sql server. I've created a table which can be updated through an aspx form. However coming from an access background I don't know how to generate an auto number. I've read through a number of the threads on here and keep coming across Identity or unique identifier. However I can't actually find out how to implement these.
Any help would be great
Cheers
StuFor Identity columns you need to set the IsIdentity property to "Yes" under Identity Specification in the design view of the table. You then set the Identity seed which is the increment you want to have for each value (usually 1).
For Uniqueidentifiers ( I have not used them until now though I have worked on systems that have used them) you could use the NEWID() function.
Check out books on line for more info. Both have performance/efficiency issues that you need to understand before you implement them.|||Thats brill thanks very much for your response.
All the best
Stu

No comments:

Post a Comment