时间:2021-07-01 10:21:17 帮助过:33人阅读
结果如下:
注: 子查询里的结果必须唯一,否则出错; 可以根据需求 添加DISTINCT
1 Update Earnings 2 set Earnings = ( 3 SELECT DISTINCT 4 CASE WHEN TABLE_2.KPI >= 1 5 THEN Table_2.KPI * 2000 6 ELSE Table_2.KPI * 1500 7 END 8 FROM Table_2 WHERE Table_2.GId = Earnings.Id)View Code
SQL 连表更新
标签:ide span png closed end isp div .com 大于等于