How can we match a condition among 2 diff. tables?

From: bhuvansql(at)yahoo(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: How can we match a condition among 2 diff. tables?
Date: 2001-07-13 06:11:10
Message-ID: 200107130611.LAA24039@Larry.bks
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql



Hi,

Consider the below...

table 'employee' with unique 'emp_id',
table 'salesorder' with 'emp_id' and unique 'sales_id'

Remember, both tables include some more different fields.

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'.

I need to accompolish in a single query!

Thankx in advance.

Regards,
Bhuvaneswar.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Grigoriy G. Vovk 2001-07-13 07:33:44 Re: Referencing a view?
Previous Message Stephan Szabo 2001-07-12 22:41:07 Re: Referencing a view?