I have a database with 3 tables. These tables represent membership information. I only want to retrieve results for groups that a specific user does NOT belong to. I’m not sure how to do this. Currently, I’m looking at the following:
SELECT
g.*,
a.*
FROM
GroupInfo g
INNER JOIN [Address] a ON a.[ID]=g.[AddressID]
OUTER JOIN [GroupMembership] m ON m.[GroupID]=g.[ID]
WHERE
m.[MemberID]<>@memberID
I’m concerned about accuracy and performance. Am I going the correct way?
Another approach is