|
|
Question : SQL Server's equivalent of Oracles sequence?
|
|
I got an assignment from school, written for Oracle. The problem is that I need to realize it in MS SQL Server.
In the assignment the teacher is telling us to "create a sequence" for generating unique ID's for a table.
My question is, is there something like Oracle's "sequence" in MS SQL Server, except the IDENTITY(n,n) statement? If so what is it?
Thanx in advance.
|
Answer : SQL Server's equivalent of Oracles sequence?
|
|
Whats wrong with identity? Creating a sequence-number in sql-server is done like this:
1. Enter entity name and set datatype to "int" 2. In the datatype properties-window set "identiy" to "yes" 3. Make sure that Identity seed and identity increment are set to 1
HenningF
|
|
|
|