存储过程 更新数据

时间:2017-12-07 12:35:01   收藏:0   阅读:216

merge into 表名 a
using(
select  
from
where
group by 
)  on (

条件
)

--如果条件成立,执行更新
when matched then
update set 只需更改条件即可

--如果条件不成立,执行添加
when not matched then
insert (
) values(
);
commit;

原文:http://www.cnblogs.com/gaomanito/p/7998462.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!