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 data definition language?
What are different clauses used in sql?
How many types of keys are there in sql?
Which sql statement is used to delete data from a database?
Which are the different types of indexes in sql?
Differentiate pl/sql and sql?
What sql does db2 use?
what is sp_pkeys? : Transact sql
How do I tune a sql query?
What is embedded sql in db2?
Explain the difference in execution of triggers and stored procedures?
What is difference between joins and union?
Explian rowid, rownum? What are the psoducolumns we have?
What are properties of the transaction?
How do I install microsoft sql?