Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query
In fact, any columns you list after the distinct clause ( which must be the first word after select ) are included in the 'distinctness' test...
vinnyop_at_yahoo.com (Vince) wrote:
>Try:
>
>select distinct col1, col2 from test;
>
>oracleinform_at_yahoo.com (Gopal) wrote in message news:<1ed02c3a.0203110314.64225045_at_posting.google.com>...
>> Hi,
>>
>> How to use distinct on 2 columns . For eg I have a table A with 2
>> columns
>>
>> A B
>>
>> 1 Oracle
>> 1 Oracle
>> 2 ORACLE
>>
>> In the above example first 2 records 2 columns are equal hence I want
>> only 1 record out of the 2 records , How to imply distinct on such
>> records , not using the rowid .
>>
>> Rgds
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! Check out our new Unlimited Server. No Download or Time Limits! -----== Over 80,000 Newsgroups - 19 Different Servers! ==----- Received on Mon Mar 11 2002 - 12:04:29 CST