经常在SQL2005的存储过程中看到如下写法:
with X (iID)
as (select iID from table1 where ...
union all
select iID from table2 where ...
)
select distinct iID from X
这里的X是什么概念?和临时表是不是类似?
...全文
713打赏收藏
请教一个问题
经常在SQL2005的存储过程中看到如下写法: with X (iID) as (select iID from table1 where ... union all select iID from table2 where ... ) select distinct iID from X 这里的X是什么概念?和临时表是不是类似?