子查询返回多行

Nat*_*ath 0 c# mysql wpf

我有这个问题:

UPDATE student_info 
    set grade = (SELECT tempTable.grade 
                     FROM tempTable
                     WHERE student_info.s_id = (SELECT s_id FROM tempTable))
Run Code Online (Sandbox Code Playgroud)

我也在这里尝试了建议的解决方案:http: //dev.mysql.com/doc/refman/5.0/en/subquery-errors.html

ype*_*eᵀᴹ 7

我想你想要:

UPDATE student_info 
  JOIN tempTable
    ON tempTable.s_id = student_info.s_id 
SET student_info.grade = tempTable.grade 
Run Code Online (Sandbox Code Playgroud)