Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on difference bet unique and distinct within the Oracle Certification forums, part of the Certification category; Is threre any difference bet 'disinct' and 'unique' key word used in select clause ex select disinct(column_name) from table_name; select unique(column_name) from table_name;...
|
|||||||
|
|||
Is threre any difference bet 'disinct' and 'unique' key word used in select clauseex select disinct(column_name) from table_name; select unique(column_name) from table_name;
|
| Sponsored Links |
|
|||
|
Re: difference bet unique and distinct
Hi Smitai,
The keywords, DISTINCT and UNIQUE are synonymous. Both are used to specify to return only one copy of each set of duplicate rows selected. One restriction is that DISTINCT cannot be specified if the FROM clause contains LOB columns. *** Innila *** |
| The Following User Says Thank You to Innila For This Useful Post: | ||
|
|||
|
Re: difference bet unique and distinct
Unique:
SQL> insert into emp values(eno number(4) unique,ejob varchar(15)); Here unique restricts the user to enter the same value more than once. Error:Voilating constraint Distinct: SQL>select distinct(ejob) from emp; Here distinct is used to eliminate the duplicate values from emp. i.e ejob |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find the unique id of mails through code | priya1985 | Scripting | 0 | 02-08-2007 03:30 AM |
| Usage of Unique Index | RyanJames | Oracle | 2 | 10-13-2006 07:00 PM |