Differences between UNIQUE and DISTINCT in select statements
Answer Posted / david alexander
There is some confusion here. Yes, UNIQUE is a constraint,
but the question is not about constraints, its about a
select statement. And, to answer it quite simply, its a
trick question. There is no difference. Although I always
see it as DISTINCT. Here is the quote from Oracle® Database
SQL Reference 10g Release 2 (10.2):
"Specify DISTINCT or UNIQUE if you want the database 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."
| Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
Is it possible to pass parameters to triggers?
Is join and inner join the same?
Does asenumerable execute the query?
Explain the the update statement in sql?
What is the difference between cluster and non-cluster index?
What is a Mapplet?
what is the difference between union and union all? : Sql dba
How is indexing done in search engines?
what is row? : Sql dba
How to look at the current sql*plus system settings?
Is it possible to read/write files to-and-from PL/SQL?
What is a null value?
What is difference sql and mysql?
Why self join is used in sql?
What is the purpose of the sql select top clause?