问题遇到的现象和发生背景
当 c表为空值时可以执行语句不报错,一旦插入数据就会报错,请问是数据的问题么,
问题相关代码,请勿粘贴截图
update INTERNET_LINE a
set a.rate =
(select c.zh_name
from temp_reol c, GROUPSERVICE b
where c.xin_id = b.product
and b.id = a.product and b.stateflag=0)
where stateflag = 0
and exists (select 1
from temp_reol c, GROUPSERVICE b
where c.xin_id = b.product
and b.id = a.product and b.stateflag=0)
运行结果及报错内容
单行子查询返回多个行
我的解答思路和尝试过的方法
在另一张相同格式的表中执行语句可以正常进行更新,到了这张表就不可以