Set Operators(Union,Union all,Intersect,Minus)

1246阅读 0评论2009-07-06 lukeunique
分类:Oracle

■ UNION Returns the combined rows from two queries, sorting them and removing duplicates.
■ UNION ALL Returns the combined rows from two queries without sorting or removing duplicates.
■ INTERSECT Returns only the rows that occur in both queries’ result sets,sorting them and removing duplicates.
■ MINUS Returns only the rows in the first result set that do not appear in the second result set, sorting them and removing duplicates.


The only place where an ORDER BY clause is permitted is at the end of the compound query.only once;
上一篇:Subqueries
下一篇:Manipulating Data