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

Поиск
Список
Период
Сортировка
От A_Schnabel@t-online.de (Andre Schnabel)
Тема Re: How can we match a condition among 2 diff. tables?
Дата
Msg-id 003001c10bba$ab3849e0$0201a8c0@aschnabel.homeip.net
обсуждение исходный текст
Ответ на How can we match a condition among 2 diff. tables?  (bhuvansql@yahoo.com)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: How can we match a condition among 2 diff. tables?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: How can we match a condition among 2 diff. tables?