EDIT:This did it:
SELECT DISTINCT profileid
FROM profilesrelevation
WHERE profileid NOT IN (
SELECT profileid FROM profiles
)
I need to get the profileid values that exist in profilesrelevation table but not in profiles table
profiles table have 8107 diffrent "profileid" values while profilesrelevation table has 8380 diffrent "profilesid" values...
profiles.profileid
profilesrelevation.profileid
select * from profiles, profilesrelevation
where profilesrelevation.profileid != profiles.profileid
does not work , how?