Differences between UNIQUE and DISTINCT in select statements

Answer Posted / pravin d. survase

UNIQUE is only used in oracle but,
DISTINCT is used in all RDBMS.

UNIQUE is used in SELECT statement and as KEY also.
DISTINCT is only used in SELECT.
DISTINCT KEY concept is not present in SQL/ORACLE.

UNIQUE also supress the duplicates but, UNIQUE KEY will
allow the duplicates.
DISTINCT supress the duplicates.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java sql connection?

746


What is the difference between delete and truncate statement in sql?

734


how can we destroy the session, how can we unset the variable of a session? : Sql dba

755


How does one load ebcdic data? : aql loader

863


how can we know the count/number of elements of an array? : Sql dba

805


What is cross join sql?

715


How do I quit sql?

708


What are the indexing methods?

797


which types of join is used in sql widely? : Sql dba

756


What are sql functions? Describe in brief different types of sql functions?

762


How do I view a sql trace file?

787


How to run sql functions in pl/sql?

763


What is trigger explain it?

775


What are secondary keys?

763


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1033