出错语句
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)
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)
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博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-745138/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-745138/