SQL UNION ALL - Introduction and syntax
SQL - Dec 03, 2008 at 18:00 PM by Rajmeet Ghai
Explain the SQL UNION ALL statement. Write SQL syntax for the SQL UNION ALL
statement along with an example.
SQL UNION ALL: The UNION ALL operator is used to combine the
result-set of two or more SELECT statements Tables of both the select statement
must have the same number of columns with similar data types. It lists ALL
records.
Syntax:
SELECT column_name(s) FROM table_name1 UNION ALL SELECT column_name(s)
FROM table_name2
Example:
SELECT emp_Name FROM Employees_india UNION ALL SELECT emp_Name FROM
Employees_USA
|