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 trigger and stored procedure in sql?
What is sql engine in oracle?
how do you control the max size of a heap table? : Sql dba
What is multiple columns?
What is join view in sql?
how to analyze tables with 'mysqlcheck'? : Sql dba
Can we update views in sql?
how to check server status with 'mysqladmin'? : Sql dba
What is pl sql record in oracle?
what are myisam tables? : Sql dba
What is cursor explain with example?
What does count (*) mean?
What is the purpose of primary key?
What is the difference between left join and right join?
How do you concatenate in sql?