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


Please Help Members By Posting Answers For Below Questions

what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

769


how to convert character strings to numeric values? : Sql dba

794


What is a left inner join?

722


What is crud stand for?

760


How can the performance of a trigger be improved?

804


What is left join in postgresql?

774


How to call a javascript function from pl sql?

796


what is oracle database ? : Sql dba

753


How many types of index are there?

741


What is mdf ldf and ndf?

759


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

753


is mysql query is case sensitive? : Sql dba

795


how to shut down the server with 'mysqladmin'? : Sql dba

755


Can we use ddl statements in stored procedure sql server?

751


How to create an array in pl/sql?

792