Mega Code Archive

 
Categories / MSSQL / Sequence
 

IDENTITY (1, 1)

1> 2> create table Players ( 3>    Id int IDENTITY (1, 1) NOT NULL , 4>    myGroup nvarchar  (10) 5> ) 6> GO 1> 2> INSERT INTO Players(myGroup) VALUES ("g1") 3> GO (1 rows affected) 1> 2> select * from Players 3> GO Id          myGroup ----------- ----------           1 g1 (1 rows affected) 1> 2> drop table Players 3> GO 1>