首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2012-08-11 
update不能将值NULL插入列update t_tagset t_tag.io_addr(select b.id from t_tag$ where a.nameb.name)

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 

热点排行