Advertisement
Guest User

Untitled

a guest
May 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. CREATE OR REPLACE PACKAGE school_api AS
  2. PROCEDURE remove_student (s_id student.student_id%TYPE);
  3. END school_api;
  4. /
  5.  
  6. CREATE OR REPLACE PACKAGE BODY school_api
  7. AS
  8. PROCEDURE remove_student(s_id student_id%TYPE)
  9. IS
  10. BEGIN
  11. DELETE FROM student
  12. WHERE student_id = s_id;
  13. END remove_student;
  14. END school_api;
  15. /
  16.  
  17. SET serveroutput ON
  18. DECLARE
  19. v_student_id student.student_id%TYPE := &v_student_id;
  20. BEGIN
  21. school_api.remove_student(v_student_id);
  22.  
  23.  
  24. dbms_output.Put_line('The new id is: '
  25. ||v_student_id);
  26. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement