1、查询solar_lh库中包含auth_department_id的所有表:
SELECT
TABLE_NAME '表名',
COLUMN_NAME '字段'
FROM
information_schema. COLUMNS
WHERE
TABLE_SCHEMA = 'solar_lh'
AND COLUMN_NAME = 'auth_department_id'
select table_name from information_schema.columns where table_schema = 'solar_lh' and column_name='auth_department_id';
2、修改系统中所有审核状态为通过;
update flow_nv_blind_plate_work set SHZT='3' where SHZT!='3';
update flow_nv_break_circuit_work set SHZT='3' where SHZT!='3';
update flow_nv_break_ground_work set SHZT='3' where SHZT!='3';
update flow_nv_confined_space_work set SHZT='3' where SHZT!='3';
update flow_nv_contractor set SHZT='3' where SHZT!='3';
update flow_nv_contractor_out set SHZT='3' where SHZT!='3';
update flow_nv_danger_interlock set SHZT='3' where SHZT!='3';
update flow_nv_facility_work set SHZT='3' where SHZT!='3';
update flow_nv_fire_work set SHZT='3' where SHZT!='3';
update flow_nv_height_work set SHZT='3' where SHZT!='3';
update flow_nv_hoisting_work set SHZT='3' where SHZT!='3';
update flow_nv_hydrogen_work set SHZT='3' where SHZT!='3';
update flow_nv_industrial_injury set SHZT='3' where SHZT!='3';
update flow_nv_inspection_point_content_relate set SHZT='3' where SHZT!='3';
update flow_nv_inspection_point_dept_check set SHZT='3' where SHZT!='3';
update flow_nv_law_regulation set SHZT='3' where SHZT!='3';
update flow_nv_operate_regulation set SHZT='3' where SHZT!='3';
update flow_nv_safety_regulation set SHZT='3' where SHZT!='3';
update flow_nv_temporary_electricity_work set SHZT='3' where SHZT!='3';
update flow_nv_train_record set SHZT='3' where SHZT!='3';
update flow_nv_work_management set SHZT='3' where SHZT!='3';
update flow_pf_accident_info set SHZT='3' where SHZT!='3';
update flow_nv_emergency_drill set publish_status = '2' where publish_status!='2';
update flow_nv_emergency_drill_parent set publish_status = '2' where publish_status!='2';
update flow_nv_emergency_plan set publish_status = '2' where publish_status!='2';
update flow_nv_operate_regulation set publish_status = '2' where publish_status!='2';
update flow_nv_safety_regulation set publish_status = '2' where publish_status!='2';
update flow_nv_emergency_drill set audit_status='3' where audit_status!='3';
update flow_nv_emergency_drill_parent set audit_status='3' where audit_status!='3';
update flow_nv_emergency_plan set audit_status='3' where audit_status!='3';
update flow_pf_accident_rectification set audit_status='3' where audit_status!='3';
update flow_pf_craft_audit set audit_status='3' where audit_status!='3';
update risk_tbl_quota_evaluation_reform set audit_status='3' where audit_status!='3';
update risk_tbl_quota_model set audit_status='3' where audit_status!='3';




