CREATE TEMP TABLE LIKE mytable.*
Posted in 1994
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
Not quite as clear as my prefered syntax, but it works fine :-)
--------------------------------------,-------------------------------------
Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ
Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/*
| mathcs.emory.edu:/pub/informix/faq/*
+64 9 377-4473 (work) 276-5546 (home) | quasar.ucar.edu:/?