Home Forums SQLServerCentral.com Editorials What Is the Hardest Feature to Learn About SQL Server? RE: What Is the Hardest Feature to Learn About SQL Server?

  • andrew gothard (7/18/2014)


    Off the top of my head, probably recursive CTE.

    Recursive processes in POSH, .Net or VBS - say to explore a directory structure - clear as a bell. But for some reason recursive SQL doesn't sit terribly well with me, I can do it, but if asked to pen an example in an interview I'd leave that one 'till last

    Considering that they're a form of RBAR that is frequently (my experience is "usually") worse for performance and resource usage than a WHILE Loop or Firehose Cursor, I'm glad that most people have a difficult time with them. I usually recommend that they be avoided even where recursion is absolutely necessary.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)