select a.id, a.phase_id, a.course_id, a.chapter_id, a.period_id,a.student_id,a.current_duration,a.current_page,a.progress, a.version, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,b.name as course_name,d.name as chapter_mame,c.name as period_name from ex_student_study a left join ex_course b on b.id=a.course_id left join ex_course_chapter c on c.id=a.chapter_id left join ex_course_chapter_period d on d.id=a.period_id delete from ex_student_study where phase_id=#{phaseId} and student_id=#{studentId}