博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

oracle 高级update

Posted on 2015-05-22 15:43  钟悍  阅读(407)  评论(0编辑  收藏  举报

merge into table_c c using table_m m on(c.username = m.username) when matched then update set c.userId = m.id;   ------将table_m中的id字段设置到table_c中userId字段

spool /tmp/insert2.log; ----设置执行日志文件

spool off; ------关闭日志