开发者

Difference between SELECT DISTINCT and SELECT UNIQUE [duplicate]

开发者 https://www.devze.com 2023-03-21 17:30 出处:网络
This question already has answer开发者_运维知识库s here: Closed 11 years ago. Possible Duplicate:
This question already has answer开发者_运维知识库s here: Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消