Re: create a table same as other table
Posted in 2001
I am not aware of any Informix utility to do this, but I guess you could do
something creative with running dbschema and shell scripts from within the
program, eg:
dbschema table a > filename
change table a to table b in filename
isql < filename
This of course would be disgustingly error prone when dealing with indexes,
dbspaces etc, maybe someone else can come up with something better.
triggerfish2001@hotmail.com on 16/01/2001 07:55:34
Please respond to triggerfish2001@hotmail.com
To: informix-list@iiug.org
cc: (bcc: Sue Davidson/EXE)
Subject: create a table same as other table
During a process I want to create a table B same as other
table A. I don't want to explicitly create the table B because
I do not want to change it everytime I make a change in the
structure of table A. Table B should be created on the fly based
on the current structure of table A.
Table B is not a temp table. It is a static table. Hence I can
not use select into temp table B syntax.
What other option do I have?
TIA.