Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with SQL statement
How about:
SELECT barcode
FROM tableaA
WHERE NOT EXISTS
(
SELECT 1
FROM tableB
WHERE tableB.barcode = tableau.barcode
)
Andy
Akram JARO <ajaro_at_synavant.com> wrote in message
news:zOCG5.104$dT.6654_at_nreader1.kpnqwest.net...
> Select a.barcodes
> from tableA a
> where a.barcodes <>(select b.barcodes
> from tableB
> Where a.barcodes <> b.barcodes );
>
>
> ciao
> Akram JARO
>
> Peter Kirk <peter_kirk_at_alpha-gruppen.dk> schrieb in im Newsbeitrag:
> 8sess8$sf$1_at_news.inet.tele.dk...
> > 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.
> >
> >
>
>
Received on Mon Oct 16 2000 - 10:01:01 CDT