jump to navigation

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.
About these ads

Comments»

1. Idetrorce - December 16, 2007

very interesting, but I don’t agree with you
Idetrorce

2. music - January 6, 2008

very interesting.
i’m adding in RSS Reader

3. Mark Mestetskiy - April 9, 2009

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.

4. Habib Gohar - April 10, 2009

Thanks for your comments MARK

5. dbametrix - October 21, 2009

Hi,

Exactly Habib and Mark both are right in way of explain in same topic.

Thanks and regards,
Gitesh
http://www.dbametrix.com

6. heroes of dragon age cheats - March 10, 2014

Appreciating the time and energy you put into your website
and in depth information you provide. It’s awesome to
come across a blog every once in a while that isn’t the same unwanted rehashed information.
Great read! I’ve saved your site and I’m adding your RSS feeds to my Google account.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: