Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sequence/auto incrementing 2

Status
Not open for further replies.

shuklix

Programmer
Jul 15, 2003
21
0
0
AU
Hi Is there an equivalent to sequence(in oracle) in Sql Server ?

I need to have a auto incrementing sequence of numbers which would be used as a primary key for the table.

Saurabh
 
sure!
you can use the identity property.

CREATE TABLE test
(
id_key int IDENTITY(1,1) PRIMARY KEY
)

definition:
IDENTITY (seed , increment)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top