Differences between UNIQUE and DISTINCT in select statements

Answer Posted / qman*

The two keywords are only synonymous in regards to a SELECT
statement, and also ONLY in an Oracle environment. DISTINCT
is an ANSI standard where as UNIQUE can only be used this
way in Oracle. To further the differences between the two,
UNIQUE may also be used in a table creation statement to
specify that inputs into the specified column cannot share
the same value, and if attempted will result in a
constraint violation error, I hope this clears things up.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pl sql data types?

542


What is full form of rtm?

522


Any attempt to navigate programmatically to disabled form in a call_form stack is allowed?

571


How to start oracle sql developer?

550


Why stored procedure is better than query?

499






How many types of cursors are available in pl/sql?

579


how many triggers are allowed in mysql table? : Sql dba

551


How can we solve sql error: ora-00904: invalid identifier?

690


Inline the values in PL/SQL, what does it mean.?

620


Where is pl sql used?

511


Is it important to partition hard disk?

526


what are the different index configurations a table can have? : Sql dba

562


How do you respond to dementia behavior?

520


How do I clear the screen in sql plus?

538


What is record variable?

542