1 Replies - 1827 Views - Last Post: 09 July 2011 - 05:58 AM Rate Topic: -----

#1 ifraq  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 03-July 11

HOw to Generate auto numbers in sql server2005

Posted 09 July 2011 - 05:38 AM

Hello , my question is that How to generate a unique primary key automatically in sql server 2005?
Is This A Good Question/Topic? 0
  • +

Replies To: HOw to Generate auto numbers in sql server2005

#2 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1817
  • View blog
  • Posts: 4,625
  • Joined: 14-March 10

Re: HOw to Generate auto numbers in sql server2005

Posted 09 July 2011 - 05:58 AM

You need to use Identity keyword to make a column auto-increment, look at its documentation and article here:
http://msdn.microsof...=sql.80%29.aspx
http://msdn.microsof...y/ms173393.aspx
http://msdn.microsof...=SQL.80%29.aspx
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1