Oracle UNION ALL/UNION/INTERSECT/MINUS

来源:互联网 发布:thinkpad t470 知乎 编辑:程序博客网 时间:2024/06/09 15:20
OperatorDescriptionUNION 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.


原创粉丝点击