65.9K
CodeProject is changing. Read more.
Home

UNION ALL between Two CTEs

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Aug 31, 2010

CPOL
viewsIcon

9940

The same thing can be done with even less SQL.WITH CTE AS( SELECT * from TableA UNION ALL Select * from TableB)select * from CTE

The same thing can be done with even less SQL.
WITH CTE AS
( 
  SELECT * from TableA
  UNION ALL
  Select * from TableB
)
select * from CTE