Using the Set Operators : Introduction « Set « Oracle PL/SQL Tutorial






OperatorDescription
UNION ALLReturns all the rows retrieved by the queries, including duplicate rows.
UNIONReturns all non-duplicate rows retrieved by the queries.
INTERSECTReturns rows that are retrieved by both queries.
MINUSReturns the remaining rows when the rows retrieved by the second query are subtracted from the rows retrieved by the first query.


Although the column names may be different, the number of columns and the column types returned by the queries must match.

3.1.Introduction
3.1.1.Using the Set Operators
3.1.2.Combining Set Operators
3.1.3.Intersect first then union