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
What is the benefit of foreign key?
Can we use view in stored procedure?
How to run pl/sql statements in sql*plus?
What is microsoft t sql?
How is debugging done?
What does inner join mean?
Is sql a oracle?
what are all different types of collation sensitivity? : Sql dba
Who developed sql?
Which is better join or inner query?
what is an extent ? : Sql dba
What type of join is sql join?
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba
What are the features of pl sql?
how are mysql timestamps seen to a user? : Sql dba