Is there any way to create a unique sequence no in SQL Server
select <sequence>.nextval from dual
We have the above code for Oracle which will create a unique number and the number cannot be used by any other.
In the same way how can I create a unique sequence number in SQL Server????
Some one help me in this
Only the upcoming SQL Server 2012 supports a sql standard conform sequence object. :-( In any current version of SQL Server (2008 R2 and below) you must use a column with the identity contstraint as in:
This will generate values in the id column starting with 1 and incrementing them in steps of 1.