SQL is a declarative language with semantics derived from relational algebra, which to me implies that there should be no execution semantics at all.<p>So the statement that &quot;a CTE is only evaluated once&quot; should not be part of any specification for the language. And I would not expect two different executions of a query to maintain that invariant if the optimizer finds it better not to.