Differences between UNIQUE and DISTINCT in select statements

Answer Posted / rob reid

Howard Cheon is correct. They are THE SAME. There is no
difference.
The following is from the Oracle 9i SQL Reference (Note the
statement "these two keywords are synonymous" - that means
they mean the same thing):

DISTINCT | UNIQUE
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.

Is This Answer Correct ?    59 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the process of debugging?

741


What does the sign mean in sql?

708


what is a composite primary key ? : Sql dba

795


How do I enable sql encryption?

722


What are the different types of sql commands?

797


How many sql statements are used?

755


how many triggers are allowed in mysql table? : Sql dba

767


What does the hierarchical profiler does?

763


Write a query to find the names of users that begin with "um" in sql?

712


What is the difference between left join and right join?

677


Explain raise_application_error.

840


What is embedded sql with example?

758


What is the difference between execution of triggers and stored procedures?

763


Can you do multiple joins in sql?

732


how is myisam table stored? : Sql dba

788