数据库
首页 > 数据库> > java.sql.SQLException: Subquery returns more than 1 row

java.sql.SQLException: Subquery returns more than 1 row

作者:互联网

java.sql.SQLException: Subquery returns more than 1 row


这是因为子查询条件返回多个。

select * from user where id = (select user_id from role_user)

解决方案(子查询带条件,保证子查询结果只有一条)
`

标签:java,Subquery,查询,returns,user,id,select,row
来源: https://blog.csdn.net/weixin_44418240/article/details/110940337