当前位置:Gxlcms >
数据库问题 >
SQL Server Update 根据自身表不同记录的值修改,链表修改
SQL Server Update 根据自身表不同记录的值修改,链表修改
时间:2021-07-01 10:21:17
帮助过:5人阅读
b1
set b1.money = b1.money + b2.money
from (
select * from wallet
where type
=‘余额‘) b1
inner join
(select * from wallet
where type
=‘积分‘) b2
on b1.userId
= b2.userId
二、表链接
update r set r.cEnable = 0 from 表1 r
inner join 表2 t on t.cId = r.cId
where r.cRow = 100
SQL Server Update 根据自身表不同记录的值修改,链表修改
标签:inner str nbsp set type rom HERE let server