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 are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
how to convert character strings to numeric values? : Sql dba
What is a left inner join?
What is crud stand for?
How can the performance of a trigger be improved?
What is left join in postgresql?
How to call a javascript function from pl sql?
what is oracle database ? : Sql dba
How many types of index are there?
What is mdf ldf and ndf?
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
is mysql query is case sensitive? : Sql dba
how to shut down the server with 'mysqladmin'? : Sql dba
Can we use ddl statements in stored procedure sql server?
How to create an array in pl/sql?