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 delimiter sql?
What is a sql select statement?
what is the difference between group by and order by in sql? : Sql dba
What are different categories of sql commands?
How do I install sql?
What is sql and how does it work?
What is sql exception?
Enlist the data types that can be used in pl/sql?
Does view store data in sql?
What are the basic techniques of indexing?
What is recursive join in sql?
What happens when a trigger is associated to a view?
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
is it possible to pass an object or table to a procedure as an argument?
Which data type is a composite type?