Sequences I

  • Nice question. It's good to see some SQL 2012 stuff now and again.

    I saw 0, 1, min(int), min(bigint) presented as options and decided I would have to find it in BoL; obviously if it had been a methematician who designed it I could forget about 1, but 0 was maybe possible (although far from optimal) and the thing would probably have type-flexibility (to cater for very long sequences when needed at the same time as allowing small numbers when vl sequences weren't needed) but that flexibility meant that the choice of which type would be default wasn't really constrained beyond the requirement for an integer type. So I had to find it in BoL instead of being able to guess the answer by applying common sense, which meant I did some useful reading again, which in turn meant that I thought it was a good question.


  • I chose "1" as the default start value because I thought it would have the same behaviour of the IDENTITY property which defaults to "start with 1, increment 1". Seems I must study more closely this welcome new feature.

    That means one less problem converting code to/from Oracle. 🙂

    Best regards,

    Andre Guerreiro Neto

    Database Analyst

  • Nice question. Got it wrong and learned something in the process 🙂 And sequences will be SQL 2012 exam questions so this is a great help.

  • Good question on a new feature. Thanks for submitting.

  • Britt Cluff (4/23/2012)

    Good question on a new feature. Thanks for submitting.



  • I don't have 2012 yet , I went through msdn

    I thought the answer would be min(bigint)+1 ; and that wasn't listed ; didn't understand the defaults ..

    guess need to dig out more..

    ~ demonfox
    Wondering what I would do next , when I am done with this one :ermm:

  • Before answering referred BOL many times, so i got it correct..

    Desire to learn new things..

Viewing 7 posts - 31 through 36 (of 36 total)

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