Identity and identity Seed in SQL?

Discussion in 'Databases' started by schgrv, Dec 8, 2008.

  1. #1
    I am new in SQL so cud you guide me to know the use of Identity and Identity seed columns in Table...................

    I don't i asked this proper way bcoz i am just learning so just help me to know the meaning & use of Identity and identity seed columns...........
     
    schgrv, Dec 8, 2008 IP
  2. mji2010

    mji2010 Active Member

    Messages:
    762
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Create Table <table Name>
    (<id Name> Int Identity(seed,increment),
    <other Column> <datatype>);

    The Identiy Column Auto Increments Starting At The Seed By The Increment Value.

    You Can Also Use Identity With Out The Seed And Increment Values And It Will Start At 1 And Increase By 1 With Each New Record
     
    mji2010, Dec 10, 2008 IP