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 -> SQL query for finding values that are not contained in a table

SQL query for finding values that are not contained in a table

From: <dimitris_at_cs.umb.edu>
Date: 18 Oct 2005 14:48:15 -0700
Message-ID: <1129672095.217012.321410@g14g2000cwa.googlegroups.com>


Hi,

I was wondering if there is a simple way to write a sql query and do the following:

Given a list of values eg ('a1', 'a2', 'a3', ...) ,which could be included in the query, we would like to look in some table column (eg col1 of tab1) and select the values that are not included in the column but they are included in our list.

One way would be to create an additional table, store the values we would like to check and then write a query to access both tables, but I was wondering if we could do this in a simpler way preferably with a single sql statement.

Thanks.

D. Received on Tue Oct 18 2005 - 16:48:15 CDT

Original text of this message

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