update更新为空值的问题
来源:互联网 发布:海岛奇兵医药包数据 编辑:程序博客网 时间:2024/04/28 13:58
SQL> set linesize 200SQL> set pagesize 200SQL> select * from a;ID AMT---------- ---------- 1 100 2 200 3 300 4 400SQL> select * from b;ID AMT---------- ---------- 1 99 2 199 3 299SQL> explain plan for update a set a.amt =(select b.amt from b where a.id=b.id) 2 ;Explained.SQL> select * from table(dbms_xplan.display());PLAN_TABLE_OUTPUT--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Plan hash value: 1561808831---------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |---------------------------------------------------------------------------| 0 | UPDATE STATEMENT | |4 | 104 | 19 (22)| 00:00:01 || 1 | UPDATE | A | | | | || 2 | TABLE ACCESS FULL| A |4 | 104 |3 (0)| 00:00:01 ||* 3 | TABLE ACCESS FULL| B |1 | 26 |3 (0)| 00:00:01 |---------------------------------------------------------------------------Predicate Information (identified by operation id):--------------------------------------------------- 3 - filter("B"."ID"=:B1)Note----- - dynamic sampling used for this statement (level=2)19 rows selected.当A表ID=4的时候,那么B.ID=4 返回空,此时A表就被更新为空正确写法:update a set a.amt =(select b.amt from b where a.id=b.id)where a.id in (select b.id from b)
0 0
- update更新为空值的问题
- update global_name为空的恢复
- Sonar代理设置-解决Sonar的Update Center插件列表为空的问题
- getResourceAsStream返回值为空的问题
- startActivityForResult返回值为空的问题
- findviewbyid()值为空的问题
- MYSQL update 某项值为空.
- Windows Update 更新问题
- request.getParameter()取值为空的问题
- 如何处理$.getjson 返回值 为空的问题
- Blob字段为空值的查询问题
- request.getParameter()取值为空的问题
- XmlNode中的Value值为空的问题
- getSerializableExtra(“item”)返回值为空不能执行的问题
- 关于属性传值为空的问题
- Request.UrlReferrer 为空的问题
- Request.UrlReferrer为空的问题
- Request.UrlReferrer为空的问题
- Linux X86 系统调用列表 system call table 32 bits and 64 bits
- 微新余微信号ivxinyu✅震撼了,史上最轻松的赚钱模式!席卷全城!
- SkImageDecoder::Factory returned null
- BSD协议
- c语言基础 之字符串案例
- update更新为空值的问题
- 用命令提示符单独打开vs自带的asp.net Development Server 服务器
- 关于vi的几个常用的快捷键
- wxPython使用基本的控件工作
- Opencv for Ubuntu14.04
- 蓝牙低功耗安全性
- 在数组中输出汉字的一点感悟
- Android学习之RecyclerView
- 安霸预发布14nm工艺的ISP芯片