t_role id, role, description role=#{role}, description=#{description}, where 1=1 and id=#{id} and role=#{role} and description=#{description} SELECT LAST_INSERT_ID() AS id insert into ( role, description ) values ( #{role}, #{description} ) update set where id = #{id} update set where id = #{id} delete from where id = #{id}