mysql 联多表更新/删除



update tt_dcas_sap_worktime w inner join tm_employee e on w.emp_code = e.EMP_CODE
inner join tm_department d on d.DEPT_CODE = e.DEPT_CODE
set 
w.dept_code = e.dept_code,
w.area_code= d.AREA_CODE 
where w.emp_code in (

'11',

'222'

)


DELETE a FROM sys_role_auth a, 
(
select '9b74ce0b394a44acb19630b76106c92e' as actionId from dual
) b WHERE a.action_id = b.actionId and a.role_id = '0db7538a757f422c8bb4ccadf96f0d91'

猜你喜欢

转载自blog.csdn.net/u011380813/article/details/53665746