Updating procedures in pl sql

29-Mar-2019 08:23

rather then the client calling "my_pkg.do_insert( ..... )" Hi Tom, forgive me for my lack of understanding of Your example. rather then the client calling "my_pkg.do_insert( ..... )" ..." Well, i didn't catch the difference,except in names :-). We could agree that in every relevant system there are at least dozen of repeted lines of code " insert into table". Don't we get modular system when in every part of system developer just call procedure for inserting data in these 'important' tables?Isn't it faster and reliable than seperate calling of insert into?Isn't that the same that You said in the second part "I think the sql should be done in PLSQL -- and the clients just call optimized, well written, efficient stored procedures." ? ); I suggest, the way to do it is like this: my_pkg.hire_emp( .... put the logic into the server, do not put the logic into the client.To be honest, i have no experiance with bulk processing, and can't say anything than: agree :-). it is less work for the server (it would have to response 4 times to the client instead of just once), it is more resuable (everyone can "hire" someone now), it is more "safe" (i can audit, security check, whatever), it is more of everything -- less of nothing. Oh, yes..of, course the package should go in the database. I was just curious about (db) package-ing insert statements, and functions for each table. Table emp -- I have pck_emp and inside procedure for insert and various functions for data i need from table temp.a@ORA817DEV select text from all_source where name = 'DEMO_PKG' order by type, line; TEXT ---------------------------------------------------------------------- package demo_pkg as type rc is ref cursor; procedure show_me_the_code( p_pkg_name in varchar2, p_code in out rc ); end; 6 rows selected. b@ORA817DEV print x TEXT ---------------------------------------------------------------------- package demo_pkg as type rc is ref cursor; procedure show_me_the_code( p_pkg_name in varchar2, p_code in out rc ); end; package body demo_pkg as procedure show_me_the_code( p_pkg_name in varchar2, p_code in out rc ) is begin open p_code for select text from user_source where name = upper(p_pkg_name) order by type, line; end; end; 21 rows selected. it is called "encapsulation" you see the spec, the interface, the inputs and outputs. April 30, 2003 - am UTC it is all about encapsulation, modular coding (yes, we can still call it that), and scoping. If I put it in a spec, EVERYONE can read and write it directly. we all know you wouldn't use standalong procedures/functions in a "real" system for real code -- just for small utilities. But if you are experimenting and only have one to two procedures, does it make sense to dump them into a package to start with or does it make more sense to develop procedures and then dump those that are similiar in scope into a package once you have further tested them?I ask because I approach the writing of procedures and SQL to answer questions that I am asked.The Ask TOM team is taking a break over the holiday season.

updating procedures in pl sql-68

who has b j novak dating

updating procedures in pl sql-84

fastlife speed dating pictures

Consider: ops$tkyte@ORA817DEV create or replace package body demo_pkg 2 as 3 4 procedure show_me_the_code( p_pkg_name in varchar2, p_code in out rc ) 5 is 6 begin 7 open p_code 8 for 9 select text 10 from user_source 11 where name = upper(p_pkg_name) 12 order by type, line; 13 end; 14 15 end; 16 / Package body created. I am not able to understand the logic behind the fact that if we grant B execute on the procedures and function created by A -- it let them see the code,but why it is not applicable for packages. February 06, 2003 - pm UTC that is one of the advantages of packages actually. why oracle think that a specification is necessary ???? How can packages be used to grant privileges, short of using execute immediate 'grant select, insert...' type statements? Kashif August 01, 2003 - pm UTC well, they are just alluding to the fact that all good, real, production code would be in a package anyway.Tom - If a user A is the owner of a package then what privilegs a user B need in order to view the code of that package body. Also user B is a normal user having looker and updater roles on the objects owned by user A and execute on the proecdures,functions and packages.

We reserve the right to send future promotional messages. To opt out of receiving marketing messages text OPTOUT to 89126.… continue reading »

Read more

The oldest fossils of anatomically modern humans found outside Africa are the Skhul and Qafzeh hominins, who lived in the area that is now northern Israel 120,000 years ago.… continue reading »

Read more

The Canadian model and the South African actress bonded when they kept running into each other at the LA area private school that their kids attend. Theron has her eldest child, son Jackson, aged six, at the school.… continue reading »

Read more