Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Question about sql
Well, not quite sure what the requirement is here - in the first instance
try
select code, id from table_name group by code, id;
or you could get a bit more info with
select code, id, count(*) from table_name group by code, id;
... and those results may give you some ideas.....
peter
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 09 July 2003 15:35
> To: Multiple recipients of list ORACLE-L
> Subject: Question about sql
>
>
> Hallo,
>
> I would like to pick out distinct both of the field Code and
> Id from this sql statement? Anyone who has an example of this?
> Maybe this sounds simple but really appreciate somehelp.
>
> I have this query,
>
> Select code, id, name, address, city, year,
> and would as told like to have distinct of both code and id field.
>
>
> Thanks in advance.
>
> Roland
>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author:
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
BGS. . http://www.bgs.ac.uk *********************************************************************
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Robson, Peter INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jul 09 2003 - 09:00:58 CDT
![]() |
![]() |