Dynamic SQL, Creating Table and insert into table
From: Sivakumar Ramamoorthy <rama_at_ms.uky.edu>
Date: Fri, 9 Jul 1993 01:18:36 GMT
Message-ID: <C9vIB1.AKv_at_ms.uky.edu>
Date: Fri, 9 Jul 1993 01:18:36 GMT
Message-ID: <C9vIB1.AKv_at_ms.uky.edu>
I have a application where I need to create a Table whose name I will give at run time.However the table is always going to have the same attributes.
i.e. I need something like
create_table(X)
char X[];
{
EXEC SQL CREATE TABLE:X AS SELECT * FROM ANOTHERTABLE; }
Which of the four modes of dynamic SQL
should I use.
namely
1. EXECUTE IMMEDIATE
2. PREPARE AND EXECUTE
3. PREPARE AND FETCH
4. PREPARE, DESCRIBE AND FETCH
Siva
rama_at_s.ms.uky.edu
Received on Fri Jul 09 1993 - 03:18:36 CEST