数据库教程:sqlserver一次性修改多条

修改客户表 编号为 0101007002,0101007003的楼栋号 007-1-102,007-1-201 UPDATE gas_customerSET building= CASEWHEN govid=380 and customer_no='0101007002' THEN '007-1-1 …

修改客户表 编号为 0101007002,0101007003的楼栋号  007-1-102,007-1-201

update gas_customer
set building= case
when govid=380 and customer_no=’0101007002′ then ‘007-1-102’
when govid=380 and customer_no=’0101007003′ then ‘007-1-201’
end
where
govid=380 and customer_no in (
‘0101007002’,
‘0101007003’
)

 

需要了解更多数据库技术:sqlserver一次性修改多条,都可以关注数据库技术分享栏目—计算机技术网(www.ctvol.com)!

www.ctvol.com true Article 数据库教程:sqlserver一次性修改多条

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/dtteaching/627152.html

(0)
上一篇 2021年5月26日 上午7:15
下一篇 2021年5月26日 上午7:19

精彩推荐