如何在Mysql子句中使用和
如何在mysql中使用和with-in,如:-如何在Mysql子句中使用和,mysql,sql,Mysql,Sql,如何在mysql中使用和with-in,如:- select * from user where userId in (1,2,3) and (3,5); 这应该只返回用户3的详细信息 但是I get error操作数应该只包含一列(这是预期的) //值(1,2,3)和(3,5)来自子查询您需要重复表达式: select * from user where userId in (1, 2, 3) and userID in (3, 5); 和连接布尔表达式(3,5)不是这样的表达式,但(3,
select * from user where userId in (1,2,3) and (3,5);
这应该只返回用户3的详细信息
但是I get error操作数应该只包含一列(这是预期的)
//值(1,2,3)和(3,5)来自子查询您需要重复表达式:
select *
from user
where userId in (1, 2, 3) and userID in (3, 5);
和
连接布尔表达式(3,5)
不是这样的表达式,但(3,5)中的用户ID是。您需要重复该表达式:
select *
from user
where userId in (1, 2, 3) and userID in (3, 5);
和
连接布尔表达式(3,5)
不是这样的表达式,但(3,5)
中的用户ID是。您的查询在和(3,5)
中缺少目标列
您的查询在和(3,5)
中缺少目标列