Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with SQL statement

Re: Help with SQL statement

From: Norbert Weintz <norbert_at_weintz.de>
Date: Mon, 16 Oct 2000 14:58:54 +0200
Message-ID: <39EAFB8E.2719CABA@weintz.de>

Peter Kirk wrote:
>
> Hi there
>
> I am *very* inexperienced with sql, and I am trying to write a statement to
> select certain rows from one table, given that no corresponding row exists
> in another table.
>
> That is, I have TableA, and TableB.
>
> TableA has these columns of interest:
> barcode;
> description;
>
> TableB has these columns of interest
> barcode;
> description;
>
> I want to find all "barcodes" that are in TableA, but not in TableB. How can
> I do this is a single sql statement?
>
> I am experimenting with "outer join" at the moment, but I'm not sure if this
> is entirely correct, and I can't seem to find the correct syntax.
>
> Thanks for any help,
> Peter.

select A.barcode from TableA A, TableB B where B.barcode =* A.barcode
and B.barcode is null

not tested

Norbert Received on Mon Oct 16 2000 - 07:58:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US