JDBC插入或修改的sql

来源:互联网 发布:淘宝卖家怎么找人刷单 编辑:程序博客网 时间:2024/06/15 19:22
 MERGE INTO xi_price a
USING (select 108615 catentry_id, 101514 store_id, 1454.00 listprice, 8.00 price, 6.0 discount, '' updatetime, '' labelimg, '' labelposition, 9.00 xiuprice from dual) b
ON (a.catentry_id=b.catentry_id)
WHEN MATCHED THEN
UPDATE SET a.store_id = b.store_id, a.listprice = b.listprice, a.price = b.price, a.discount = b.discount, a.updatetime = b.updatetime, a.labelimg = b.labelimg, a.labelposition = b.labelposition, a.xiuprice = b.xiuprice
WHEN NOT MATCHED THEN
INSERT VALUES(b.catentry_id, b.store_id, b.listprice, b.price, b.discount, b.updatetime, b.labelimg, b.labelposition, b.xiuprice);
commit;
原创粉丝点击