34,590
社区成员
发帖
与我相关
我的任务
分享
;with testtab (a,b,c,d)
as
(
select 1 a,2 b,3 c,4 d
)
select a,b,c,d from testtab
a b c d
----------- ----------- ----------- -----------
1 2 3 4
(1 row(s) affected)
with testtab (a,b,c,d)
as
(
select 1 a,2 b,3 c,4 d union all select 11,12,13,14
)
select a,b,c,d from testtab
--result:
a b c d
----------- ----------- ----------- -----------
1 2 3 4
11 12 13 14
(2 行受影响)