MySQL Join problem

admin

Administrator
Staff member
There's my 2 tables:
Users:
IDUser | FullName
1 | Name1 LastName1
2 | Name2 LastName2
3 | Name3 LastName3
4 | Name4 LastName4

and Users_Activities:
IDActivity | IDUser
1 | 1
1 | 3

So Users 1 and 3 haves Activity n?1

Now I want to download the list of users in the USERS table excluding the selected in the USERS_ACTIVITES table..

What's the query?
Mine is:
SELECT DISTINCT Users.IDUser, Users.FullName
FROM Users, Users_Activities
WHERE Users.IDUser <> Users_Activites.IDUsers

but it returns me all rows.. what should I use?

Thanks in advance
Alan
P.S. Sorry for my english
 
Back
Top