INSERT INTO evaluation_reports (student_id, term_id, teacher_id, teacher_evaluation,student_evaluation) VALUES (90, 29, 19, 'some random text ', NULL) ON DUPLICATE KEY UPDATE teacher_evaluation = 'some random text ', student_evaluation = NULL,  teacher_id = 19 