How to get the DDL to create some tables?
How to get the DDL to create some tables?
(OP)
We have an Informix database and the boss want me to get the script to create 90 existing tables. He does not really want to recreate those existing tables, but he want the DDL script. Does anybody know how to do it in Informix? Don't tell me I have no alternative but doing it manually.
Thanks a lot.
Thanks a lot.
RE: How to get the DDL to create some tables?
Thanks.
RE: How to get the DDL to create some tables?
Informix has the dbschema utility that creates the schema for a single table or the whole database:
dbschema -t all -d <dbname> -p all <outputfilename>
This does the whole database, but if all your table names are in tmpfile:
while read file
do
dbschema -t $file -d <dbname -p all "$file".sql
done < tmpfile
Regards,
Ed
Schaefer
RE: How to get the DDL to create some tables?