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
How do I pipe the output of one isql to another?
What is sql and also describe types of sql statements?
What do you think about pl/sql?
how to create a new table in mysql? : Sql dba
what is query cache in mysql? : Sql dba
Mention what does the hierarchical profiler does?
What is the advantage of nosql?
Can we insert data into materialized view?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
Can we use update in sql function?
What is data profiling in sql?
What is meaning of <> in sql?
Why is a primary key important?
Why do we use view in sql?
What is sap sql?