尽管缺少子查询,MySQL更新错误“子查询返回超过1行”

时间:2011-11-22 15:10:01

标签: mysql sql mysql-error-1242

我对mysql 5.1.56进行了查询:

select * from team_member_accounts where node = 33136

...只返回一行。但是,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

嗯......什么?什么子查询?它怎么会超过一行呢?

2 个答案:

答案 0 :(得分:1)

该表可能有触发器。

答案 1 :(得分:0)

可能会试试这个 更新team_member_accounts set fee_remaining = 0,     loan_account_balance = 35000,     reimbursable_amount = 0,     reimbursed_amount = 0 其中node =(SELECT DISTINCT(NODE)FROM team_member_accounts其中node = 33136)

如果它不起作用,我觉得你的表格很奇怪