Subject Re: [firebird-support] alter in stored procedure
Author Helen Borrie
At 02:11 PM 3/10/2003 +0700, you wrote:
>Hi List,
>
>can i do this?
>
>CREATE PROCEDURE sp_test
>(tabname VARCHAR(24), colname VARCHAR(24), datatype VARCHAR(24))
>AS
>BEGIN
> ALTER TABLE :tabname ADD :colname :datatype;
>END
>
>how can i alter table (add new columns) in stored procedure?

You can't do it. In stored procedures, you cannot change metadata (create,
recreate, alter, drop, set).

Write a DDL script for this kind of operation.

heLen