公共表表达式和派生表

混合使用简单的例子:

; WITH cte(id,name) AS
(
  SELECT 1,'one' UNION ALL
  SELECT 2,'two' UNION ALL
  SELECT 3,'three'
)
SELECT * FROM cte
原文地址:https://www.cnblogs.com/freecodeX/p/4390514.html