SQL Server - IN clause with multiple fields

后端 未结 8 720
野性不改
野性不改 2020-12-20 11:42

Is it possible to include in a IN clause multiple fields? Something like the following:

select * from user
where code, userType in ( select code         


        
8条回答
  •  无人及你
    2020-12-20 11:58

    How about this instead:

    SELECT user.* FROM user JOIN userType on user.code = userType.code AND user.userType = userType.userType
    

提交回复
热议问题