Oracle_set operator, oracle Operator
Zookeeper
Oracle_set Operator
① UNION/UNION ALL
The UNION operator returns the UNION of two query result sets. Deduplication for the duplicate parts of the two result sets
Example:
Select id, name
From tableA
Union
Select id, name
From tableB
The union all operator returns the UNION of two query result sets. Duplicate parts of the two result sets are not duplicated.
Example:
Select id, name
From tableA
Union all
Select id, name
From tableB
② INTERSECT
The INTERSECT operator returns the intersection of two result sets.
Example:
Select id, name
From tableA
Intersect
Select id, name
From tableB
③ MINUS
Minus operator: returns the difference set of two result sets.
Example:
Select id, name
From tableA
Minus
Select id, name
From tableB
Note:
1. The column names and expressions in the SELECT list correspond to the number and data type.
2. In addition to union all, the system automatically deletes duplicate records.
3. The system displays the column name of the first query in the output.
4. Except union all, the system automatically sorts the first column in ascending order of the first query.