ITeye博客

SQL/Oracle 两表关联更新

guochongcan · 2019-02-21 16:10 · Oracle · 数据库 · Markdown

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)

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。