Is it possible to include in a IN
clause multiple fields? Something like the following:
select * from user
where code, userType in ( select code
Only with something horrific, like
select * from user
where (code + userType) in ( select code + userType from userType )
Then you have to manage nulls and concatenating numbers rather than adding them, and casting, and a code of 12 and a usertype of 3 vs a code of 1 and a usertype of 23, and...
So there ya go: a solution that doesn't use joins or exists.. and a bunch of reasons why you shouldn't use it ;)