SorryDog777
Programmer
Hi, Our company is switching over from Oracle to MS SQL.
I have searched through the archives and found the question below, but couldn't reply to it. So I started a new thread. I apologize in advance if this is a dumb question.
Question:
"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."
I need the same thing, but not use the sequence number as a primary key. The sequence number is numeric and needs to auto increment like in Oracle. Example: 5551234, the next number would be 5551235 and so on. Oracle does something like lock the table when issuing out a number so there is no possibility of duplicate numbers.
Any idea how to achieve this?
Thanks for any help you can provide.
SD
I have searched through the archives and found the question below, but couldn't reply to it. So I started a new thread. I apologize in advance if this is a dumb question.
Question:
"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."
I need the same thing, but not use the sequence number as a primary key. The sequence number is numeric and needs to auto increment like in Oracle. Example: 5551234, the next number would be 5551235 and so on. Oracle does something like lock the table when issuing out a number so there is no possibility of duplicate numbers.
Any idea how to achieve this?
Thanks for any help you can provide.
SD