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
Why join is faster than subquery?
Are subqueries better than joins?
Which is faster view or stored procedure?
How do I enable sql encryption?
What is cold data?
What is data definition language?
Does oracle use sql?
Explain the insert into statements in sql?
What is AUTH_ID and AUTH_USER in pl/sql ?
When you have to use a default "rollback to" savepoint of plvlog?
what is oracle database ? : Sql dba
What is sql rowcount?
what is innodb? : Sql dba
Why plvtab is considered as the easiest way to access the pl/sql table?
Which operator is used in query for pattern matching?