Write a PL/SQL program to display the description against a grade according to the marks achieved by students in their final exams.
DECLARE
grade CHAR(1);
BEGIN
grade := '&new_grd';
CASE grade
WHEN 'A' THEN dbms_output.Put_line('Outstanding');
WHEN 'B' THEN dbms_output.Put_line(' Excellent');
WHEN 'C' THEN dbms_output.Put_line('Very Good');
WHEN 'D' THEN dbms_output. Put_line('Average');
WHEN 'F' THEN dbms_output.Put_line('Poor');
ELSE dbms_output.Put_line('Invalid Grade.');
END CASE;
END;
Comments
Leave a comment