Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: What is the difference between unique and distinct clause ?

    Hi all,

    What is the difference betwenn unique and distinct clause ?

    select unique col1 from table1;

    select distinct col1 from table1;

    But I could only see the same result !!!

  2. #2
    Join Date
    Jul 2003
    no difference.
    I always thought of them as synonymous, however I think Oracle
    would like to move solely to distinct.

    this is what Oracle says:
    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.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts