Re: Some SQL-Questions!
Posted in 1998
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Carlson@WHSmith wrote:
>
> Magnus Westling wrote:
> >
> > Does anyone know the syntax for creating temptables in informix. I know how it works in sybase?
> >
> > /Robert
>
> try
>
> SELECT col1, col2, col3
> FROM tab_a
> WHERE {wherever}
> into temp (temptable name)
This creates an IMPLICIT temp table with the same layout and column
names as the select statement. You can also create EXPLICIT temp
tables by adding the TEMP keyword to the CREATE TABLE statement, thus:
CREATE TEMP TABLE freddy (....
);
An explicit temp table create statement may contain IN <dbspace> and
EXTENT SIZE n NEXT SIZE m clauses as well as constraints and triggers.
These options are not available when creating an IMPLIED temp table.
Art S. Kagel