Tuesday, June 5, 2012

upgrading the tables with new values for certain col


create or replace procedure p1
(v_tab varchar,v_col varchar,v_val varchar)
as
v_sql varchar2(2000);
begin
null;
v_sql:='update  '||v_tab|| ' set  '||v_col ||' = '|| v_val;
EXECUTE IMMEDIATE v_sql;
end;
begin
p1('DEPT','LOC',1);
end;