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 natural join and inner join same?
Which is faster union or join?
what are tables and fields? : Sql dba
Can a trigger call a stored procedure?
What is the usage of the distinct keyword?
How to fix oracle error ora-00942: table or view does not exist
what is a view? : Sql dba
How to call a javascript function from pl sql?
What is parallel hint?
What are the parts of a sql statement?
How can a function retun more than one value in oracle with proper example?
what is a table in a database ? : Sql dba
what is innodb? : Sql dba
Why is a primary key important?
Which data dictionary views have the information on the triggers that are available in the database?