to create table inside stored procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Anas Mosaad
    replied
    Only this statement is enough:
    Code:
     create table abc
    (
    empid numeric
    );
    Unless you want to create dynamic tables you will use execute immediate.

    Leave a comment:


  • perl iyer
    started a topic to create table inside stored procedure

    to create table inside stored procedure

    im trying to create a table in DB2 EXPRESS C for example
    Code:
    create procedure TEST
    dynamic results sets
    p1: begin
    
    begin
    execute immediate'
    create table abc
    (
    empid numeric
    );
    end;
    how can i do this? please help. once i write this procedure table should be created
    Last edited by Rabbit; Oct 21 '13, 11:42 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
Working...