当前位置: 代码迷 >> Sql Server >> update不能将值NULL插入列,该怎么处理
  详细解决方案

update不能将值NULL插入列,该怎么处理

热度:35   发布时间:2016-04-27 11:49:34.0
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 aset a.io_addr=b.idfrom  t_tag a,t_tag$ bwhere  a.name=b.name
  相关解决方案