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

Thread: SP

  1. #1
    Join Date
    Apr 2001
    Posts
    112
    can you create tables inside a stored procedure in 9i

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    yes, you have to use dynamic sql
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Apr 2001
    Posts
    112
    But can you create a table using execute immediate inside a stored procedure

  4. #4
    Join Date
    Jan 2002
    Posts
    148
    yes

  5. #5
    Join Date
    Aug 2001
    Posts
    134

    yes, you have to use dynamic sql

    Plz marist89 , Jr
    write examples.

  6. #6
    Join Date
    Jan 2002
    Posts
    148
    declare
    begin
    execute immediate 'create table myt ( c char ) tablespace testtbsp ';
    end;
    /

    BTW - Execute immeidate is available from 8i and u need to use DBMS_SQL pckg for the same if below 8i.

    Thanx
    Jr.

  7. #7
    Join Date
    Apr 2001
    Posts
    112
    But try putting this inside a stored procedure ; It fails for me giving insufficient privileges??

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