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
How to load data with sql*loader?
Is left join faster than inner join?
Where not exists in sql?
What is the difference between cross join and natural join?
Does google use sql?
What is embedded sql with example?
What is composite primary key in sql?
How to download oracle sql developer?
What is left join in sql?
What is the purpose of a secondary key?
How do I remove all records from a table?
What is the syntax to add a record to a table?
Is primary key an index?
What is oracle sql developer?
What is the difference between a query and a report?