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
What is the purpose of a secondary key?
What is a temporal data type?
Explain what is sql?
how can we know the number of days between two given dates using mysql? : Sql dba
How do I count rows in sql query?
What is difference between procedure and trigger?
Can we create foreign key without primary key?
Why is theta join required?
What does where 1/2 mean in sql?
What are the types of index in sql?
What is the advantage of nosql?
What is sql prepared statement?
How does index help in query performance?
What are the types pl/sql code blocks?
what is primary key? : Sql dba