首页 > 数据库技术 > 详细

delphi sqlsever 实现存在则更新,不存在

时间:2017-09-20 11:36:11      阅读:289      评论:0      收藏:0      [点我收藏+]

(‘ if exists(select * from NBcommission where Type=‘‘‘+sType+‘‘‘and ItemNo=‘‘‘+s+‘‘‘ ) ‘+
‘ begin‘+
‘ update NBcommission set Amount=‘‘‘+m+‘‘‘ , CType=‘‘‘+sCType+‘‘‘where Type=‘‘‘+sType+‘‘‘and ItemNo=‘‘‘+s+‘‘‘ ;‘+
‘ end;‘ +
‘ else‘+
‘ begin‘+
‘ INSERT into NBcommission (Type,ItemNo,Unit,Amount,Ctype) values ( ‘‘‘+sType+‘‘‘ , ‘‘‘+s+‘‘‘ , ‘‘‘ +sUnit+ ‘‘‘ , ‘‘‘ +m+ ‘‘‘ , ‘‘‘ +sCType+ ‘‘‘); ‘+
‘ end;‘
);

delphi sqlsever 实现存在则更新,不存在

原文:http://www.cnblogs.com/semth/p/7560269.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!