Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    1

    Unanswered: creation of table in pl/sql program

    Hello!

    i want to create a table in PL/SQL program between begin and end but unable to create. even i have used

    EXECUTE immediate 'CREATE TABLE X(A DATE)'

    command inside begin and end but unable...error is
    SQL> @test
    4 /
    EXECUTE immediate 'CREATE TABLE X(A DATE)'
    *
    ERROR at line 2:
    ORA-06550: line 2, column 9:
    PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the following:
    := . ( @ % ;


    will some body help me how to overcome this problem

    regards

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You mean like this?
    Code:
    SQL> begin
      2    EXECUTE immediate 'CREATE TABLE X(A DATE)';
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    Works for me!

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    It works for me:
    Code:
    SQL> begin
      2    EXECUTE immediate 'CREATE TABLE X(A DATE)';
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.

Posting Permissions

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