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
Why is pl sql needed?
Why functions are used in sql?
What is identity column in sql server?
Can you load data into multiple tables at once? : aql loader
What is trigger in pl sql?
Define union, minus, union all, intersect ?
How many postgresql users are there, worldwide?
How do I save a stored procedure?
What is the difference between sql and mysql?
What is numeric function sql?
How to know the last executed procedure?
How do I count records in sql?
How many aggregate functions are available there in sql?
What is offset and limit in sql?
What are the basic sql commands?