SQL UNION ALL
SQL UNION ALL operator is used to combine the result sets of two or more select statements.
- UNION ALL operator allows duplicate values .
- All select statement within UNION ALL must have the same number of columns
- The columns must also have similar data types.
- The columns in each SELECT statement must also be in the same order
SYNTAX
select column1, column2 ,... from table1
UNION ALL
select column1, column2 ,... from table2
No comments:
Post a Comment