我有两个表TABLE1
包含(deptno,sal)
列,TABLE2
包含(deptno and location)
列现在我想在sal
列中为这些更新1000个工资在PARIS
工作的人员(位置栏目表2),您能否回答我如何进行更新?
答案 0 :(得分:1)
试试这个:
UPDATE t1 SET t1.sal = t1.sal+1000
From Table1 as t1 INNER JOIN Table2 as t2 On t1.deptno = t2.deptno
WHERE t2.location = 'PARIS'