SQL TUTORIALS-
SQL UNION Operator
Introduction-
β In a Simple Word UNION operator is used to combine the result sets of two or more SELECT statements into a single result set...
SQL UNION Operator. SELECT must have the same number of columns. also Columns must have similar data types.
β Syntax Example -
SELECT column1, column2 FROM table1
UNION
SELECT column1, column2 FROM table2;
SQL UNION Operator. Example of two Table 1)-Employee IND. And 2)-Employee US.
| EmpID | Name |
|---|---|
| 1 | ANNI |
| 2 | BOULT |
| 3 | POOJA |