Re: How can we match a condition among 2 diff. tables? - Mailing list pgsql-sql

From A_Schnabel@t-online.de (Andre Schnabel)
Subject Re: How can we match a condition among 2 diff. tables?
Date
Msg-id 003001c10bba$ab3849e0$0201a8c0@aschnabel.homeip.net
Whole thread Raw
In response to How can we match a condition among 2 diff. tables?  (bhuvansql@yahoo.com)
List pgsql-sql
Hi,

if you translate your (english) idea striktly to SQL, you'll make it ;-)
>  Now, i need to get the details of all employees who did 
>  receive NONE of the salesorders. ie.. i wish to select the 
>  records of table 'employee' whose 'emp_id' are not 
>  there in table 'salesorder'.

SELECT * FROM employee
WHERE emp_id NOT IN (   SELECT emp_id FROM salesorder
);





pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: How can we match a condition among 2 diff. tables?
Next
From: Stephan Szabo
Date:
Subject: Re: How can we match a condition among 2 diff. tables?