Re: CREATE TEMP TABLE LIKE mytable.*
Posted in 1994
In article <WBpokq4b9RLH073yn@kcbbs.gen.nz> kerry@kcbbs.gen.nz (Kerry Sainsbury) writes:
>I've been reading thru The Wish List and encountered that old chestnut
>requesting the ability to create temporary tables LIKE permanent tables.
>
>eg: CREATE TEMP TABLE mytemp (prodno LIKE product.prodno,
> desc LIKE product.desc)
>
>I've wanted this functionality too and was about to email JL (he's famous
>enough to not need his full name, isn't he?) my vote for this feature, when
>it occured to me:
>
> SELECT prodno, desc FROM product
> WHERE ROWID = -1
> INSERT INTO TEMP mytemp
Or just:
select *
from real_tab
where 1 = 2
into temp temp_tab with no log ;
Now if someone could tell me how to do "create a temp table
just like an existing table EXCEPT that serial column foo -
I want that to be integer in my temp table" ...
Paul