/*更新数据的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;
db2,sqlserver的更新sql
最新推荐文章于 2022-06-01 11:18:24 发布