热线电话:13121318867

登录
2020-06-03 阅读量: 1452
MySQL之Error Code:1241

Code: 1241. Operand should contain 1 column(s)

问题原因:操作数列只有一列,但是我们在操作中多处一列或者参数格式不正确

例如:

错误语句:select * from emp where (select deptno,job from emp where ename="smith") and ename<>"smith" ;#选择和smith同一个部门的员工信息

Error Code: 1241. Operand should contain 1 column(s)

正确语句:select * from emp where (select deptno from emp where ename="smith") and ename<>"smith" ;#选择和smith同一个部门的员工信息

14.7841
1
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子