Received: from Donald.bks ([203.145.133.16]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6D6Eaa39667 for ; Fri, 13 Jul 2001 02:14:37 -0400 (EDT) (envelope-from bhuvansql@yahoo.com) Received: from Larry.bks (root@Larry.bks [200.2.1.10]) by Donald.bks (8.11.2/8.11.2) with ESMTP id f6D6NqF12334 for ; Fri, 13 Jul 2001 11:53:52 +0530 Received: from Larry.bks (bhuvan@Larry.bks [200.2.1.10]) by Larry.bks (8.9.3/8.8.5) with SMTP id LAA24039 for pgsql-sql@postgresql.org; Fri, 13 Jul 2001 11:41:10 +0530 Date: Fri, 13 Jul 2001 11:41:10 +0530 From: bhuvansql@yahoo.com Message-Id: <200107130611.LAA24039@Larry.bks> X-Authentication-Warning: Larry.bks: bhuvan@Larry.bks [200.2.1.10] didn't use HELO protocol To: pgsql-sql@postgresql.org Subject: How can we match a condition among 2 diff. tables? X-Archive-Number: 200107/165 X-Sequence-Number: 3957 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.