Execute Immediate in Stored Procedure

in Oracle Database; Hi, I am using execute emmidiate in one of my stored procedure. Following is the line I am using : ...
+ Post Reply + Post New Topic
Results 1 to 3 of 3
  1. #1
    SomnathG is offline Junior Member
    Points: 110, Level: 2
    Join Date
    12 Jan 2011
    Posts
    4
    Points
    110

    Question Execute Immediate in Stored Procedure

    Hi,

    I am using execute emmidiate in one of my stored procedure. Following is the line I am using :
    execute immediate 'TRUNCATE TABLE CALC_RESIDUAL_FORMULA REUSE STORAGE';

    Before this statement I have some insert queries. My question is - will execute immediate truncate statement will commit all previously inserted data after execution. In normal scenario, a truncate statement commits previous database changes. Is it behave same as for 'execute immediate' truncate staement also?

    Thanks in advance.
    Somnath Guha


  2. #2
    SBH
    SBH is offline Forum Expert
    Points: 3,670, Level: 38
    Join Date
    27 Sep 2010
    Location
    Bangalore
    Posts
    99
    Points
    3,670

    Re: Execute Immediate in Stored Procedure

    Yes, it will commit all your previous transactions. TRUNCATE in EXECUTE IMMEDIATE is same as instructing Oracle server to execute the given command.

  3. #3
    SomnathG is offline Junior Member
    Points: 110, Level: 2
    Join Date
    12 Jan 2011
    Posts
    4
    Points
    110

    Re: Execute Immediate in Stored Procedure

    Thanks SBH for Quick reply.

Other Solutions
  1. Execute a Package from a Procedure
    By philseery in forum SQL PL/SQL
    Replies: 3
    Last Post: 10-14-2010, 09:54 AM
  2. Oracle Stored Procedure
    By nishapd in forum Oracle Database
    Replies: 2
    Last Post: 11-25-2009, 12:42 PM
  3. Stored Procedure
    By yashk111 in forum SQL PL/SQL
    Replies: 5
    Last Post: 11-10-2009, 01:26 PM
  4. Replies: 4
    Last Post: 10-22-2009, 01:40 PM
  5. problem scheduling a stored procedure
    By vamsioracle in forum Oracle Apps Technical
    Replies: 4
    Last Post: 05-27-2009, 11:56 AM