db2,sqlserver的更新sql

 /*更新数据的SQL语句写法
  1、DB2
     update em.t_comm_customer a
     set a.custmgr=(select b.custmgr from  sq.T_COMM_CUSTOMER20051231 b where a.customercode=b.customercode)
        where a.customercode in (select customercode from sq.T_COMM_CUSTOMER20051231)
  2、SQL SERVER
     update a set a.custmgr=b.custmgr
        from em.t_comm_customer a,sq.T_COMM_CUSTOMER20051231 b where a.customercode=b.customercode 
/*更新字段内容*/
    字符型字段:  在原有字段的基础上,加上'a',在加上字段  BATCHDESC 的内容      
    db2:update SQ.T_COMM_CUSTOMER_20060318 set  VISITSALESMANDESC= VISITSALESMANDESC||'a'||BATCHDESC;
    sql server:update dbo.suyu_khdm set khdzdh=khdzdh+'11';
      数值型字段:增加1000          
    db2:update SQ.T_COMM_CUSTOMER_20060318 set  VISITSALESMANID=VISITSALESMANID+1000;
    sql server:update dbo.sfgs20051012 set xl=xl+1;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值