Re: copy table
Posted in 1997
"Billy Wheeler" — — source: Informix-list mailing list archive (1991-1998)
On 12 Feb 97 at 9:07, Chengteh Lee wrote:
> In the schema editor, how do I copy one existing table
> to create a new table, including the contents
> and the index?
There isn't any way to do this in the schema editor. The quickest way
I can think of to do this is as follows:
1. $ dbschema -t oldtable -d yourdbname x.sql
2. $ vi x.sql
3. [change all occurrences of oldtable to newtable]
4. In dbaccess/query/new type:
INSERT INTO newtable SELECT * FROM oldtable;
HTH.
--
Ciao,
Billy
"...nod's as good as a wink to a blind bat..."