更新一张表a的内容关联其他表作为条件:
第二种比较小白我以前的做法
仅供参考欢迎指正。
小宝制造。
update a set name='xx'
from t1 t1,t2 t2
where t1.age=t2.age
t1.name = a.name
第二种比较小白我以前的做法
update tc set task_code = 'xxxx'
WHERE
task_code = 'xxxxx2'
AND exists (
select cust_code FROM alc
WHERE district_code = 'aa'
AND cust_code = tc.cust_code
AND cust_sample_flag = '1'
)
仅供参考欢迎指正。
小宝制造。