Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Package

Re: PL/SQL Package

From: Kevin Crosbie <caoimhinocrosbai_at_at_yahoo.com>
Date: Fri, 07 Jul 2006 17:34:46 +0200
Message-ID: <44ae7e9e$0$3785$88260bb3@news-taz.teranews.com>


Christian Schneider wrote:
> Hi,
>
> I have to create a package that "contains" the accesses to
> insert, delete, update, select on a certain table (Lets say "myTable")
>
> Sorry, can you give me a hint? I don't really grasp what they want me to
> do - I can create users and grant them the right to do an insert,
> delete, update or select on a certain table -
> but how can I do the above????
>
>
> Thanks in advance,
>
> Chris
>

Sounds like they want you to create an interface to the table via a package so that they can control what people do on the table. Normally I would allow users direct access to selecting stuff...

For instance, you'd have a package header of:

create or replace type myTableArray is object of

   ... whatever rows in mytable are;
/

create or replace package my_table_interface as

   procedure update_row (primarykey IN myTable.primarykey%TYPE,

                         col_1_newvalue IN myTable.col1%TYPE,
                         col_2_newvalue IN myTable.col2%TYPE);

   procedure delete_row (primarykey IN myTable.primarykey%TYPE);

   function select_rows (col_1_value IN myTable.col1%TYPE,

                         col_2_value IN myTable.col2%TYPE)
   return myTableArray;

end;
/

The body is up to you... Received on Fri Jul 07 2006 - 10:34:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US