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
Change is inevitable... Change for the better is not.