MYSQL --Subquery returns more than 1 row查询结果多于一行



Subquery returns more than 1 row表示子查询返回了多行数据,子查询返回多行数据作为sql的条件值传递用关键字“any”查询

例如:

select * from table1 where table1.colums=(select columns from table2)

解决方法

select * from table1 where table1.colums=any(select columns from table2)

你可能感兴趣的:(sql,any)