JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

oracle update多表关联查询更新

发布时间 2023-09-01 15:56:26作者: 炼金师
--假设我要更新tableA表的emp_id为和tableB表的emp_id,条件是tableA的emp_id和tableB的emp_no相等,那么写法如下
update tableA a
set a.emp_id = (select b.emp_id from tableB b where b.emp_no= a.emp_id)
where exists (select 1 from sys_emp b where b.emp_no = a.emp_id)

 

    本栏目推荐文章
  • oracle清除日志
  • 2024-01-13 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. ==》引用了未使用的方法导致
  • Oracle用户授权篇
  • Oracle 19c 升级错误【verify_queryable_inventory returned ORA-20001: Latest xml inventory is not loaded into table】
  • oracle varchar字段修改为clob字段(已经有数据的也可以修改)
  • Virtualbox - VM can't start after OS update
  • mysql的for update
  • Oracle 21c-创建数据库
  • Oracle查询多种数据结构并计算合计值
  • Cannot load driver class: oracle.jdbc.OracleDriver
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们