insert into employee values(#{id},#{name},#{sex},#{birthday},#{salary},#{phone},(select id from department where dept = #{dept})) delete from employee where employee.id = #{id}; update employee name = #{name}, sex = #{sex}, birthday = #{birthday}, salary = #{salary}, phone = #{phone}, dept_id = (select id from department where dept = #{dept}), where employee.id = #{id};