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

Who is the owner of mysql database?

545


What are different types of queries in sql?

513


Define select, insert, create, delete, update, drop keywords

592


What is bind variable in pl sql?

517


What is auto increment feature in sql?

611






What are all the common sql functions?

555


Which sql most popular?

543


Why do we use partitions in sql?

537


Is join an inner join?

528


How do I count duplicates in sql?

539


How to sort the rows in sql.

593


What is raw datatype in sql?

545


What are types of joins?

528


Where is all the data on the internet stored?

547


What is sql and how does it work?

539