This section would have Advance Concept of PL/SQL.
AUTHID DEFINER V/S AUTHID CURRENT_USER
How to Select the Nth highest / lowest value from a table
Duplicate rows in the table
Display the number value in Words
Pragma
NOCOPY
DYNAMIC SQL
BULK COLLECT
FORALL
Sunday, August 3, 2008
Subscribe to:
Post Comments (Atom)
2 comments:
explain me how to call this function
create or replace function updnval(
tab in varchar2,
col in varchar2,
val in number,
whr in varchar2 := null,
sch in varchar2 := null)
return integer is
begin
execute immediate
'update'||nvl(sch,user)||','||tab||
'set'||col||'=:the_value where'||
nvl(whr,'1=1') using val;
return sql%rowcount;
end;
/
Hi Shaikh,
After creating the function in the database.
Use the following.
Declare
xx NUMBER;
begin
xx := updnval(tab => ___
,col => ___
,val => ___
,whr => ___
,sch => ___
);
dbms_output.put_line(xx);
end;
Post a Comment