Possible Duplicate:
Unique vs distinct multi-column in Oracle 9i
Proper difference between SELECT DISTINCT and SELECT UNIQUE with points and examples.
SELECT DISTINCT
and SELECT UNIQUE
behave the same way in oracle.
While DISTINCT
is ANSI SQL standard, UNIQUE
is an Oracle specific statement.
Look here: http://psoug.org/definition/DISTINCT.htm
Oracle official documentation
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#sthref9346
States that:
DISTINCT | UNIQUE
Specify DISTINCT or UNIQUE if you want the database to return only one copy of each set of duplicate rows selected. These two keywords are synonymous. Duplicate rows are those with matching values for each expression in the select list.
精彩评论