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

Why triggers are used?

796


What is embedded sql in db2?

773


what is 'mysqlimport'? : Sql dba

776


What is the primary use of normalization?

759


Show the cursor attributes of pl/sql.

825


What are the most important ddl statements in sql?

808


What is crud stand for?

790


Is sql scripting language?

780


Can we call a function containing dml statements in a select query?

779


What are the ways on commenting in a pl/sql code?

757


how to convert character strings to dates? : Sql dba

776


differentiate between float and double. : Sql dba

825


What is trigger with example?

798


Which kind of parameters cannot have a default value in pl sql?

870


What are pl/sql packages?

836