Tuesday, October 6, 2015

Make two different queries with similarly structured results come back in one dataset with UNION ALL in T-SQL.

This has the following pseudocode which shows off how to use UNION ALL:

SELECT expression1, expression2, ... expression_n
FROM tables
WHERE conditions
UNION ALL
SELECT expression1, expression2, ... expression_n
FROM tables
WHERE conditions;

No comments:

Post a Comment