July 1, 2009 at 8:53 am
I thought I hear that something like this was coming into SQL Server, but I can't find anything. Perhaps I'm not finding the magic search term, does anyone know whether this did indeed become available in either 2005 or 2008?
July 1, 2009 at 10:30 am
SQL has ranking functions that people use for sequence numbers (ROW_NUMBER, RANK, DENSE_RANK). But, I'm not aware of anything that allows you to specify a one PK for mutiple tables.
Do you have an example of what your describing? Maybe there is a way to do what you want, but I'm doubting it.
July 1, 2009 at 10:44 am
When you talk sequence number all I can think of are identity columns in tables. can you explain in greater detail what your looking for?
July 1, 2009 at 10:44 am
Don't think there is an equivalent to sequences in Oracle. You need to create a table that contains the number, read it via a function and update it afterwards.
July 1, 2009 at 11:00 am
not sequential numbers but may be guid can be used which is unique every time it's generated. but they look weird:w00t:
July 1, 2009 at 11:03 am
Unfortunately, without further explaination from the OP regarding what he is looking for, all we can do is offer up guesses.
July 1, 2009 at 11:09 am
I think he is referring to sequence in oracle which is an object at a database level to generate sequence numbers and is used just like our identity(which is used at table level)
To generate next sequence number, they write like mySequence.nextval which gives them next generated sequential numeric value...
This feature is not present in SQL Server, as far as i know.
EDIT - Or may be he is referring to something else as you said Lynn.
July 1, 2009 at 11:12 am
They do, each table can have a single column defined as an IDENTITY column.
July 1, 2009 at 11:18 am
yep, they do but in oracle val1 can be used by table1, val1+1 can be used by table2, val1+3 can be used by table3 and so on...
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply