>
> This is the situation:
>
> I have 2 tables, a and b as following:
>
> --------------
> | a |
> --------------
> | eid | name |
> --------------
>
>
> ------------------
> | b |
> ------------------
> | id | gid | eid |
> ------------------
>
> *) a.eid and b.id are primary keys
>
> *) b.eid points to a.eid entries
>
>
> Now my wish:
>
> *) b.gid = fixed given value
>
> *) i want all entries from a , which are NOT referenced by any entries
> from b.eid where b.gid = fixed given value
>
> Is this possible with only one sql-statement?
>
Is this wat you want?
select a.eid from a left join b using (eid)
where b.gid = <fixed> and b.eid is null
Paul B. van den Berg email: [EMAIL PROTECTED]
Department of Social Pharmacy and Pharmacoepidemiology
University Centre for Pharmacy tel:31-50-3633331 fax:31-50-3632772
Ant. Deusinglaan 1 9713 AV Groningen Netherlands
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php