Not the way you have posted. You can only return a single field or type for
IN to work.
From MSDN (
test_expression [ NOT ] IN
( subquery | expression [ ,...n ]
subquery - Is a subquery that has a result set of one column.
This column must have the same data type as test_expression.
expression[ ,... n ] - Is a list of expressions to test for a match.
All expressions must be of the same type as
IN, you could use a
JOIN using the two fields:
FROM user U
INNER JOIN userType UT
ON U.code = UT.code
AND U.userType = UT.userType