Results 1 to 4 of 4

Thread: Diff B/w EXECUTE IMMEDIATE AND DBMS_SQL

  1. #1
    Junior Member
    Join Date
    Apr 2006
    Answers
    12

    Thumbs up Diff B/w EXECUTE IMMEDIATE AND DBMS_SQL

    What is the Diff B/w EXECUTE IMMEDIATE AND DBMS_SQL


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: Diff B/w EXECUTE IMMEDIATE AND DBMS_SQL

    "EXECUTE IMMEDIATE" is a new feature added in Oracle 9i. Before oracle9i you have to use only DBMS_SQL package in order to execute dynamic sql queries.

    "EXECUTE IMMEDIATE" is simple to use and it provides better performance than DBMS_SQL.


  3. #3
    Junior Member
    Join Date
    Apr 2006
    Answers
    12

    Re: Diff B/w EXECUTE IMMEDIATE AND DBMS_SQL

    and i also found that in execute immediate DML statements need to be commited.Where as in DBMS_SQL they r auto commited .


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074
    a little change to james's statment

    EXECUTE IMMEDIATE is available in oracle from version 8i not 9i as stated by james.

    The following issues teeds to be kept in mind before using any of these two .

    1. EXECUTE IMMEDIATE is used for functionalities such as OBJECTS and COLLECTIONS which is not supported in DBMS_SQL.
    2. EXECUTE IMMEDIATE reprepairs the dynamic string everytime before execution, so it might create some overhead.
    3. Using DBMS_SQL to execute DDL can lead to Deadlocks

    Last edited by jamesravid; 07-24-2007 at 07:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact