update t_tablename
set aTh2=null
where (aCustomerCode,aTh2) in
(select aCustomerCode,aDoNotCallNum from tDoNot where aType'02');
用in肯定慢,可以改为a.aCustomerCode=b.aCustomerCode的sql吗?
update t_tablename t
set aTh2=null
where exist (select * from tDoNot d wheret.aCustomerCode=d. aCustomerCode and t.aTh2=d.aDoNotCallNum and d.aType'02')
最初由 diablo2 发布
[B]update t_tablename t
set aTh2=null
where exist (select * from tDoNot d wheret.aCustomerCode=d. aCustomerCode and t.aTh2=d.aDoNotCallNum and d.aType'02')