• Hi Gail,

    I originally was trying to find out if CTE's use TEMPDB? I was always told to think of them as you said.

    "CTEs are nothing more than a named subquery."They are not temp tables or table variables."

    But doing more reading, its seems just because they are named subquery does not mean a temp table(worktable) is not created in the background. It looks to me that table spools are used for recursive CTE there for a spool operator is used.

    Thanks sorry for the confusion

    http://blogs.msdn.com/b/craigfr/archive/2007/10/25/recursive-ctes.aspx