Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Package
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