Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / SQL

UNION ALL between Two CTEs

0.00/5 (No votes)
31 Aug 2010CPOL 9.9K  
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.

SQL
WITH CTE AS
( 
  SELECT * from TableA
  UNION ALL
  Select * from TableB
)
select * from CTE

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)