Sequence Number

  • 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?

  • 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.

  • 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?

  • 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.

  • not sequential numbers but may be guid can be used which is unique every time it's generated. but they look weird:w00t:



    Pradeep Singh

  • Unfortunately, without further explaination from the OP regarding what he is looking for, all we can do is offer up guesses.

  • 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.



    Pradeep Singh

  • They do, each table can have a single column defined as an IDENTITY column.

  • 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...



    Pradeep Singh

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply