INSERT INTO evaluation_reports (student_id, term_id, teacher_id, teacher_evaluation,student_evaluation) VALUES (89, 29, 19, 'Some random teacher\'s evaluation.', NULL) ON DUPLICATE KEY UPDATE teacher_evaluation = 'Some random teacher\'s evaluation.', student_evaluation = NULL,  teacher_id = 19 