inner JOIN (SELECT mobile_phone,MIN(id) as id FROM p_doctor WHERE delete_flag=1 and mobile_phone is not null GROUP BY mobile_phone having count(*)>1) inn
on pd.id != inn.id and pd.mobile_phone = inn.mobile_phone) ttt);
</update>
<insertid="updateDoctorModifyRecord">
insert into log_p_doctor(`doctor_id`, `sex`, `name`, `mobile_phone`, `tel`, `status`, `type`, `hospital_id`,
SELECT * FROM p_doctor where modify_time > DATE_SUB(DATE_FORMAT(NOW(),'%Y-%m-%d %H:00:00'),INTERVAL 1 hour) and modify_time < DATE_FORMAT(NOW(),'%Y-%m-%d%H:00:00')