Difference between Distinct and Unique March 9, 2007
Posted by Muhammad Habib in Oracle General.trackback
Specify DISTINCT or UNIQUE if you want Oracle 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.Restrictions on DISTINCT and UNIQUE Queries
- When you specify DISTINCT or UNIQUE, the total number of bytes in all select list expressions is limited to the size of a data block minus some overhead. This size is specified by the initialization parameter DB_BLOCK_SIZE.
- You cannot specify DISTINCT if the select_list contains LOB columns.
very interesting, but I don’t agree with you
Idetrorce
very interesting.
i’m adding in RSS Reader
I beleive there is another difference, may be not exactly related to Oracle. UNIQUE is Oracle proprietary term. DISTINCT is more standard used in ANSI SQL. While Disctinct will work with MySQL or other similar products, UNIQUE – won’t.
Thanks for your comments MARK
Hi,
Exactly Habib and Mark both are right in way of explain in same topic.
Thanks and regards,
Gitesh
http://www.dbametrix.com