Extended IF-THEN Statement
DECLARE
grade CHAR(1);
BEGIN
grade := 'B';
IF grade = 'A' THEN
dbms_output.Put_line('Excellent');
ELSIF grade = 'B' THEN
dbms_output.Put_line('Very Good');
ELSIF grade = 'C' THEN
dbms_output.Put_line('Good');
ELSIF grade = 'D' THEN
dbms_output.Put_line('Fair');
ELSIF grade = 'F' THEN
dbms_output.Put_line('Poor');
ELSE
dbms_output.Put_line('No such grade');
END IF;
END;
/
0 comments:
Post a Comment