子查询的where条件比 update 的where 条件多 不是有b.agentno like'9___' and a.isactive='Y' and b.isactive='Y' 第一个回复 因为没细看 sorry
解决方案 »
- oracle 字符问题
- 有没有好的oracle,plsql学习文档
- 关于一个ORCALE语法的问题
- 两台服务器间实时同步问题
- asp.net 开发oracle,中多用户同时间访问的问题
- 求sql语句,如何只去掉一个重复字段
- 公司将来一台Oracle服务器,要送一个人去培训,公司银子不多,请问该参加什么样的培训啊?目前大家都只会SQL Server,谢谢啊!
- 哪位给讲讲dual,tab,tabs,cat的意义和内容
- 高级问题:嵌入到浏览器下的Excel如何访问oracle数据库(不要安装客户端软件)?
- oracle10g连接报12505
- 建表的时候有没有什么办法能够查看建表的进度呢。
- 求大神 PLSQL 使用
但是
a..pk_tw_user_id 应该是主键不能为空!1.解决办法 要不核查B表查出来的数据为啥为空,看是否是错误数据
2.把A表主键去了,
set a.pk_tw_user_id = b.agentno from tb_shop a, tb_userinfo b
where a.pk_tw_user_id = b.tu_user_bh
and b.agentno like '9___'
and a.isactive = 'Y'
and b.isactive = 'Y'
set a.pk_tw_user_id =
(select b.agentno
from tb_userinfo b
where a.pk_tw_user_id = b.tu_user_bh)
where a.isactive = 'Y' and exists (select 1
from tb_userinfo b
where a.pk_tw_user_id = b.tu_user_bh
and b.agentno like '9___'
and b.isactive = 'Y')
这样应该可行吧
from tb_userinfo u where u.agentno like'9___' and s.isactive='Y' and u.isactive='Y' and s.pk_tw_user_id=u.tu_user_bh)