ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 运行merge语句报ora-00926

运行merge语句报ora-00926

原创 Linux操作系统 作者:wisdomone1 时间:2012-09-26 16:53:21 0 删除 编辑
出错语句
 
merge into t_t1
using t_tmp
on (t_t1.product_id=t_tmp.product_id)
when not matched then insert t_t1(t_t1.product_id,t_t1.product_name) 
          values(1,'ab')
 
修正后语句
merge into t_t1
using t_tmp
on (t_t1.product_id=t_tmp.product_id)
when not matched then insert (t_t1.product_id,t_t1.product_name)
          values(1,'ab')
 
小结:1,insert前面无表名,直接insert
  

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-745138/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690141