On MS SQL Server, which column property lets you indicate an auto increment column?
- incremental
- identity
- incremental_identity
- increment
EXPLANATION
Identity let's you say that column have an auto increment value, from X by Z, for example: identity(1,1), says start on 1 and sum 1 by 1 (1,2,3,4,5,6......). identity(55,10) says start on 55 and go 10 by 10 (55,65,75,85,95,.....).This is fine when you have a registry table (like a log, for example), and you need a primary key that always its unique. For that you can use the GetDate() function (that is unique too XD).
0 comments:
Post a Comment