Byrd24
08-08-2003, 03:16 PM
I need help with the following:
Using the Oracle database, create a function based on a student table that you will create. This function will determine the highest grade of all the students in your student table.
This is what I have but not sure if I am on the right track:
CREATE OR REPLACE FUNCTION student_grades
2 RETURN NUMBER
3 AS
4 s_grade NUMBER(3);
5 BEGIN
6 SELECT MAX(grade)
7 INTO s_grade
8 FROM student_grade_table;
9 RETURN s_grade;
10 END student_grades;
11 /
Using the Oracle database, create a function based on a student table that you will create. This function will determine the highest grade of all the students in your student table.
This is what I have but not sure if I am on the right track:
CREATE OR REPLACE FUNCTION student_grades
2 RETURN NUMBER
3 AS
4 s_grade NUMBER(3);
5 BEGIN
6 SELECT MAX(grade)
7 INTO s_grade
8 FROM student_grade_table;
9 RETURN s_grade;
10 END student_grades;
11 /