• David Webb-200187 (3/18/2013)


    From the MS site:

    A common table expression can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE, or CREATE VIEW statement.

    When the query plan for a common table expression query uses a spool operator to save intermediate query results, the Database Engine creates a work table in tempdb to support this operation.

    http://msdn.microsoft.com/en-us/library/ms345368(v=SQL.105).aspx

    What about "When the query plan for a common table expression query does not use a spool operator"?

    _____________
    Code for TallyGenerator