Can we exec a procedure by using execute immediate
Printable View
Can we exec a procedure by using execute immediate
You can EXECUTE IMMEDIATE pl/sql block, that call to procedure.
begin
execute immediate 'call sp_proc()';
end;
What is the advantage of using 'Execute Immediate' over 'Execute'?
this will be helpfull when u create a whole pl/sql block dynamically. i this case i cannot use the conventional way.
if iam wrong do correct me
Hi there,
my preferred one:
EXECUTE IMMEDIATE 'BEGIN scott.do_it; END;'
cu
6502
originally posted by Raminder:
------------------------
What is the advantage of using 'Execute Immediate' over 'Execute'?
------------------------
with execute immediate you can execute a sql or a procedure dynamically, which can be very advantageous if your sql or procedure needs variable or parameter that is not fixed.