Home > database >  Ask, how to do
Ask, how to do

Time:09-20

(1) create a stored procedure, with class id as a parameter, output the name of the class,
(2) to create a stored procedure, with class id as the parameter and return the number of students in the class (in the form of parameters return),
(3) to create a stored procedure to the class id number as a parameter, output the class of 10 youngest student information,
(4) to create a function to the class number as a parameter, the average age of the return to Perth,
(5) create a package, the package contains a process and a cursor, the cursor returns 13 class all the students' information; Stored procedures to achieve 5 records of each output cursor,
(6) create a trigger in the student table, when inserted, deleted or modify the students information, statistics the number of the class, and the output,

CodePudding user response:

The table structure and post test data

CodePudding user response:

This is the homework assignments? Suggested that the building Lord, where is the card, everybody is good to help you manage the train of thought,

CodePudding user response:

(1)
The create or replace function getClassName (p_classid varchar2) return varchar2 is
The begin
Declare v_classname varchar2 (200);
Select the classname into v_classname from tab_class where every p_classid;
Return v_classname;
end;

Other similar