• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Identity Columns

Identity columns provide an autoincrementing value for a table. You should use an identity column as the primary key field for any table that has no natural primary key that is short, stable, and simple. Identity columns are often the int data type. You use the properties of the field to designate a column as an identity column (see Figure 5.10). Notice that once you designate a column as an identity column, you can designate both the identity seed and the identity increment. The identity seed is the starting value for the field. The identity increment is the value by which each automatically assigned value is incremented. For example, an identity field with an identity seed of 100 and an identity increment of 5 will assign the values 100, 105, 110, and so on.

Figure 5.10. You use the properties of the field to designate a column as an identity column.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint