Adding Procedures/Functions to an existing Oracle Package
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Adding Procedures/Functions to an existing Oracle Package

Threaded View

  1. #1
    Join Date
    Nov 2003
    Posts
    31

    Adding Procedures/Functions to an existing Oracle Package

    Hi All,

    I would like to know if I can add a function to an existing package. For example, here is how my package is defined:

    CREATE OR REPLACE PACKAGE BODY cpack AS

    PROCEDURE AddStudent (p_id in students.id%TYPE) IS

    BEGIN
    INSERT INTO students (id) values (p_id);
    COMMIT;
    END AddStudent;

    END cpack;

    The above package has already been created in the database.

    I would like to add another procedure to the above package:

    create or replace procedure DropStudent (p_id IN students.id%TYPE)
    AS
    BEGIN
    DELETE from students WHERE id = p_id;
    COMMIT;
    END DropStudent;

    Questions:

    1. Is it possible to add this procedure to the existing package?
    2. Is it any different when we add functions to an existing package?
    3. Any syntax you can provide in doing so would be greatly appreciated.

    Thanks,
    Sankar.
    Last edited by sankar6254; 03-21-2005 at 06:25 PM.
    Sankar B. Mandalika

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width