SQL/Oracle 两表关联更新
程序员文章站
2022-03-07 13:54:06
...
update info_1 a set (a.cname,a.ename) = (select b.cname,b.ename from info_2 b where b.code = a.code and rownum = 1)
where substr(a.code, 1, 2) = '11' and exists (select 1 from info_2 b where b.code = a.code)
where substr(a.code, 1, 2) = '11' and exists (select 1 from info_2 b where b.code = a.code)
上一篇: Oracle 增加修改删除字段