Create a package named as INFO which contains procedure that is passed a student’s identification number and return student’s full name and phone number from the student table to the calling program and function, pass a department number to it. If the DEPT table does not contain the department number, return a FALSE value otherwise return a TRUE value. Print the appropriate message to the calling program.
CREATE OR REPLACE PACKAGE BODY INFO AS
PROCEDURE find_student(stu_id student.id%TYPE) IS
BEGIN
SELECT full_name, phone_number INTO details
FROM student
WHERE id = stu_id;
dbms_output.put_line(details);
END find_student;
END INFO;
Comments
Leave a comment