Sequences II

  • Revenant

    SSC-Forever

    Points: 42467

    Well maybe it was not so easy -- currently only 25 percent of correct answers. That's the lowest one I have seen in a long time.

  • sknox

    SSChampion

    Points: 12294

    Revenant (4/24/2012)


    Well maybe it was not so easy -- currently only 25 percent of correct answers. That's the lowest one I have seen in a long time.

    Yes, it looks like most people are thinking that sequence defaults to starting at the lowest value, and therefore runs out. That was the first "gotcha" I thought of, and I was pleasantly surprised that Microsoft had thought of it too.

  • TomThomson

    SSC Guru

    Points: 104773

    Nice fun question. And really nice to see that MS has picked defaults that make sense for this new feature.

    Tom

  • marlon.seton

    SSCrazy

    Points: 2623

    I'm obviously missing something here.

    "SELECT NEXT VALUE FOR SSC_ROCKS;" is used twice in the question, so why aren't two numbers returned?

  • TomThomson

    SSC Guru

    Points: 104773

    marlon.seton (4/25/2012)


    I'm obviously missing something here.

    "SELECT NEXT VALUE FOR SSC_ROCKS;" is used twice in the question, so why aren't two numbers returned?

    Two numbers are returned. But the answer is ony one of these two values, the scond of the two, because

    the question asks what value is returned by the second select statement, not what are all values returned by both select statements.

    Tom

  • marlon.seton

    SSCrazy

    Points: 2623

    L' Eomot Inversé (4/25/2012)


    marlon.seton (4/25/2012)


    I'm obviously missing something here.

    "SELECT NEXT VALUE FOR SSC_ROCKS;" is used twice in the question, so why aren't two numbers returned?

    Two numbers are returned. But the answer is ony one of these two values, the scond of the two, because

    the question asks what value is returned by the second select statement, not what are all values returned by both select statements.

    Obviously reading the question helps!

  • Ken Wymore

    SSCoach

    Points: 16642

    Nice 2012 question. Thanks!

  • SQLRNNR

    SSC Guru

    Points: 281252

    straight forward question - thanks

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Iulian -207023

    SSCertifiable

    Points: 7509

    thanks for the question, new feature questions are always nice

  • SQLWinther

    SSCertifiable

    Points: 5946

    Nice question!

    /Håkan Winther
    MCITP:Database Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform

  • Dineshbabu

    Hall of Fame

    Points: 3220

    dawryn (4/24/2012)


    tommyh (4/23/2012)


    Startvalue will be MinValue (since its not given).

    Check reference again. Start value is different whether sequence is ascending or descending.

    without properly understanding difference between asc and desc. I answered wrongly..

    --
    Dineshbabu
    Desire to learn new things..

Viewing 11 posts - 31 through 41 (of 41 total)

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