DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: exec immediate

  1. #1
    Join Date
    Sep 2000
    Posts
    384
    Can we exec a procedure by using execute immediate
    Radhakrishnan.M

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    You can EXECUTE IMMEDIATE pl/sql block, that call to procedure.

  3. #3
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    begin
    execute immediate 'call sp_proc()';
    end;
    Cheers!
    OraKid.

  4. #4
    Join Date
    Aug 2001
    Location
    Waterloo, On
    Posts
    547
    What is the advantage of using 'Execute Immediate' over 'Execute'?

    Raminder Singh

    Oracle Certified DBA: Oracle 8i, 9i


    Mail me at raminderahluwalia@rediffmail.com.

  5. #5
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    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
    Cheers!
    OraKid.

  6. #6
    Join Date
    Mar 2001
    Location
    Cologne, Germany
    Posts
    24

    Wink

    Hi there,
    my preferred one:

    EXECUTE IMMEDIATE 'BEGIN scott.do_it; END;'

    cu
    6502

  7. #7
    Join Date
    Sep 2001
    Location
    Makati, Philippines
    Posts
    857
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width