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 files into tables with 'mysqlimport'? : Sql dba
What is rownum?
Is microsoft sql free?
what is the use of friend function? : Sql dba
How to change sql*plus system settings?
How does stored procedure reduce network traffic?
Can ddl statements be used in pl/sql?
What does count (*) mean in sql?
What is the difference between having and a where in sql?
write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba
what is the difference between undefined value and null value? : Sql dba
What is the primary key?
Which is faster joins or subqueries?
how to drop an existing view in mysql? : Sql dba
How many aggregate functions are available there in sql?