Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE PACKAGE school_api AS
- PROCEDURE remove_student (s_id student.student_id%TYPE);
- END school_api;
- /
- CREATE OR REPLACE PACKAGE BODY school_api
- AS
- PROCEDURE remove_student(s_id student_id%TYPE)
- IS
- BEGIN
- DELETE FROM student
- WHERE student_id = s_id;
- END remove_student;
- END school_api;
- /
- SET serveroutput ON
- DECLARE
- v_student_id student.student_id%TYPE := &v_student_id;
- BEGIN
- school_api.remove_student(v_student_id);
- dbms_output.Put_line('The new id is: '
- ||v_student_id);
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement