MySQL 更新错误“子查询返回超过 1 行”尽管缺少子查询
我在 mysql 5.1.56 上有一个查询:
select * from team_member_accounts where node = 33136
...它只返回一行。但是,Subquery returns more more than 1 row
出现以下查询错误:
update team_member_accounts
set fee_remaining = 0,
loan_account_balance = 35000,
reimbursable_amount = 0,
reimbursed_amount = 0
where node = 33136
嗯...什么?什么子查询?怎么会超过一排呢?
I have a query on mysql 5.1.56:
select * from team_member_accounts where node = 33136
...that returns exactly one row. However, the following query errors with Subquery returns more than 1 row
:
update team_member_accounts
set fee_remaining = 0,
loan_account_balance = 35000,
reimbursable_amount = 0,
reimbursed_amount = 0
where node = 33136
Um...what? What subquery? And how is it more than one row?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该表可能有一个触发器。
The table likely has a trigger.
可能会尝试这个
更新 team_member_accounts
设置fee_remaining = 0,
贷款账户余额 = 35000,
可报销金额 = 0,
报销金额 = 0
where node = (SELECT DISTINCT(NODE) FROM team_member_accounts where node = 33136)
如果它不起作用,我认为你的表很奇怪
may be try this one
update team_member_accounts
set fee_remaining = 0,
loan_account_balance = 35000,
reimbursable_amount = 0,
reimbursed_amount = 0
where node = (SELECT DISTINCT(NODE) FROM team_member_accounts where node = 33136)
if it doesnt work, i think strange in your table