Subject | Re: [firebird-support] Re: select .. into new_table from exist_table |
---|---|
Author | David Johnson |
Post date | 2005-05-29T00:02:44Z |
On Sat, 2005-05-28 at 22:55 +0000, Svein Erling Tysvær wrote:
matches the result of the select statement (a subtle difference, but
important if you are using this mechanism to change the type of data
being stored). It is based on the embedded SQL syntax used by some
embedded SQL preprocessors.
The latter syntax presumes the pre-existence of the table.
> > > Can I use SQL-92 SELECT * INTO NEW_TABLE FROM EXIST_TABLE ???The former syntax is correct for creating a new table that exactly
> >
> > Only if new_table has identical structure to exist_table
>
> Wouldn't the syntax then be
>
> INSERT INTO NEW_TABLE SELECT * FROM EXIST_TABLE?
>
matches the result of the select statement (a subtle difference, but
important if you are using this mechanism to change the type of data
being stored). It is based on the embedded SQL syntax used by some
embedded SQL preprocessors.
The latter syntax presumes the pre-existence of the table.