ALTER TABLE mail_flow DROP COLUMN main_dept_id; ALTER TABLE mail_flow DROP COLUMN second_dept_id1; ALTER TABLE mail_flow DROP COLUMN second_dept_id2; update mail_flow f set f.handler_name = (SELECT u.name from police_user u where u.emp_no = f.handler_emp_no);