Subject | Re: create table as select |
---|---|
Author | Adam |
Post date | 2006-07-14T00:07:39Z |
--- In firebird-support@yahoogroups.com, "kapsee" <kapil.surlaker@...>
wrote:
even do that in the same transaction, let alone the same operation.
with a query to retrieve the data from your bar table
http://fbtalk.net/viewtopic.php?id=16
and use the returned values to build your create table statement.
You can use the following syntax once your table exists.
insert into foo select * from bar
Adam
wrote:
>This does not surprise me, you are mising DDL with DML. You shouldn't
> It seems there is no support for creating a table as duplicate of
> another by doing "create table foo as select * from bar".
>
even do that in the same transaction, let alone the same operation.
> The only way seems to be do a create table foo followed bytable.
> insert into bar select * from foo;
>
> But this requires I specify all the table columns during the create
>Not the sort of thing that really makes sense at runtime, but start
> Is there a workaround for duplicating a table without specifying all
> the columns of the original table explicitly ?
with a query to retrieve the data from your bar table
http://fbtalk.net/viewtopic.php?id=16
and use the returned values to build your create table statement.
You can use the following syntax once your table exists.
insert into foo select * from bar
Adam