Mega Code Archive

 
Categories / MSSQL Tutorial / Sequence Indentity
 

A table could also be created so that the seed value was negative and the increment was positive

4>  CREATE TABLE MyTable (MyID Int IDENTITY(-1000000, 100) NOT NULL 5>            ,MyDescription NVarChar(50) NOT NULL) 6> GO 1> 2> 3> drop table MyTable; 4> GO 1> By default, once a column has been assigned the IDENTITY property, SQL Server does not allow explicit values to be inserted into it.