0
点赞
收藏
分享

微信扫一扫

使用OPENROWSET :在一个数据库中查询另一个数据库的数据

前端王祖蓝 2023-10-20 阅读 26

问题描述:
update 表名 set age =‘23’ where id=1 and name=‘lili’;
当在oracle执行以上sql时执行成功,但是当传入的name为null时,sql不成立。我的表中id和name是联合唯一索引,以为name不会为空,但实际上name可以为空,且为空时,不能为=,而是is,即sql为

update 表名 set age ='23' where id=1 and name is null;

而不是

update 表名 set age ='23' where id=1 and name=null;
举报

相关推荐

0 条评论