日期:2014-05-18  浏览次数:20441 次

update不能将值NULL插入列
update t_tag
set t_tag.io_addr=(select b.id from t_tag$ where a.name=b.name)
from t_tag a,t_tag$ b

报RT错误,估计是查出来的b.id数量小于t_tag.io_addr的数量,然后自动被null填充了
在不改变数据库表结构的情况下有什么好办法么
在线等,感谢

------解决方案--------------------
SQL code
update
 a
set
 a.io_addr=b.id
from
  t_tag a,t_tag$ b
where
  a.name=b.name