Cerating Table In Procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SAMEEN
    New Member
    • Dec 2007
    • 1

    Cerating Table In Procedure

    HELO !
    Please HELP me SOON in creating table in procerdure i write the following statment but it gives error
    CREATE OR REPLACE
    PROCEDURE EMP_BACK_UP_SAL ARY
    (param IN VARCHAR2) AS

    BEGIN

    CREATE TABLE a AS (SELECT * FROM b);

    END;

    Error
    "Encountere d the symbol CREATE while expecting the following like BEGIN CASSE DECLARE ETC"
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You need to execute the create table statment with EXECUTE IMMEDIATE.

    EX
    ------

    execute immediate 'create table ..............' ;

    Comment

    Working...