Multipe CTE in single Query

Kirthiga
Posted by Kirthiga under Sql Server category on | Points: 40 | Views : 786
;with cte1 as 
(select 1 as [First]),
cte2 as
(select 2 as [Second]),
cte3 as
(select 3 as [Third]),
cte4 as
(select 4 as [Fourth]),
cte5 as
(select 5 as [Fifth])
select * from cte1 cross join cte2 cross join cte3 cross join cte4 cross join cte5

Comments or Responses

Login to post response