ROW_NUMBER

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 715107

    Comments posted to this topic are about the item ROW_NUMBER

  • PRAMANA.DBA

    SSCertifiable

    Points: 5507

    Easy one...

  • twin.devil

    SSC-Insane

    Points: 22208

    Nice question. Thanks for sharing

  • Koen Verbeeck

    SSC Guru

    Points: 258909

    Easy enough for a Monday morning 😀

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Raghavendra Mudugal

    SSChampion

    Points: 10658

    Thank you for the post, Steve, simple one. (for me the choice was obvious, but my uncontrolled mind was still looking for the trick/catch.) 🙂

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • This was removed by the editor as SPAM

  • Hany Helmy

    SSChampion

    Points: 13321

    Finally easy 😉

  • Mr. Kapsicum

    SSCertifiable

    Points: 6128

    Easy One

  • Ed Wagner

    SSC Guru

    Points: 286957

    An easy one, yes. But it covers such a powerful piece of functionality. If you don't know windowing functions, it's worth it to take the time to learn them.

  • SqlMel

    SSCrazy

    Points: 2891

    +1.

    Thanks, Steve.

    ---------------
    Mel. 😎

  • bholthuijsen

    Valued Member

    Points: 63

    The result is undefined without an ORDER BY in the main query. Most likely the results will be sequential by ID.

  • RLilj33

    SSCrazy

    Points: 2146

    Thanks Steve - great question.

    Tally tables and set-based thinking - this should be the first topic users of SQL learn after CRUD when picking up the language. My personal thanks to Jeff Moden for the invaluable insights and instructions on this topic.

  • Kick6Tiger

    SSCrazy

    Points: 2368

    I'm guessing the answer will be correct as long as there are always a minimum of 10 rows in the sysobjects table. Nice question, I seem to use this function quite often.

    Aigle de Guerre!

  • Gail Shaw

    SSC Guru

    Points: 1004424

    Meow Now (10/13/2014)


    I'm guessing the answer will be correct as long as there are always a minimum of 10 rows in the sysobjects table.

    Which, since there are more than 10 system tables will always be the case.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Dana Medley

    SSCertifiable

    Points: 6764

    Raghavendra Mudugal (10/13/2014)


    Thank you for the post, Steve, simple one. (for me the choice was obvious, but my uncontrolled mind was still looking for the trick/catch.) 🙂

    Great question and I agree with Raghu. I was waiting for the "got'cha" but couldn't find one.



    Everything is awesome!

Viewing 15 posts - 1 through 15 (of 22 total)

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