I\'m trying to construct a query that will include a column indicating whether or not a user has downloaded a document. I have a table called HasDownloaded with the followin
@Mark: I understand why the JOIN syntax works, but thanks for the warning. I do think your suggestion is more intuitive. I was curious to see which was more efficient. So I ran a quick test (this was rather simplistic, I'm afraid, over only 14 rows and 10 trials):
In the JOIN condition:
AND HasDownloaded.memberID = @memberID
In the WHERE clause:
WHERE HasDownloaded.memberId IS NULL OR HasDownloaded.memberId = @memberId
It looks like the WHERE clause is ever-so-slightly more efficient. Interesting! Once again, thanks to both of you for your help.