SELECT a.id_user,a.name, a.surname from user a LEFT JOIN workgroup b ON
a.id_user=b.id_user WHERE b.id_user IS NULL;




Daniele Medri <[EMAIL PROTECTED]> wrote:
Hi All,
this is my problem:

2 tables..

1) workgroup(id_survey,id_user,...)
..where i put reference of user with multiple istances.

2) user(id_user,name,surname,...)
..where there're all users

i need to select with a single query what user aren't in workgroup.
I've tried some query+join but i didn't retrieve right data.

i tried:
select distinct a.id_user,a.name, a.surname from user a, workgroup b where
a.id_user <> b.id_user;

Could someone help me?
--
Daniele Medri





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

Reply via email to