3) |
Execute the following two SELECT statements and explain why they produce different output:
SELECT e.student_id, e.section_id, e.final_grade, g.numeric_grade, COALESCE(g.numeric_grade, e.final_grade) grade FROM enrollment e, grade g WHERE e.student_id = g.student_id AND e.section_id = g.section_id AND e.student_id = 102 AND g.grade_type_code = 'FI';
SELECT e.student_id, e.section_id, e.final_grade, g.numeric_grade, NULLIF(g.numeric_grade, e.final_grade) grade FROM enrollment e, grade g WHERE e.student_id = g.student_id AND e.section_id = g.section_id AND e.student_id = 102 AND g.grade_type_code = 'FI';
|
No comments:
Post a Comment