extracting the table definition from one tabke and create same tables on another database
Posted on 2006-10-25
I have a requirement where in I need to create a bunch of tables in a database. I am getting the table defnitions from 5 different databases and creating the same into this newly created database.
example: lets assume there are 3 databases
Database= A (with tables: X and Y),
Database = B (with table: P and Q)
Now I want to create those tables X, Y, P and Q into the Database C. If I do it manually, I get the table definitions from the databases A and B and create them manually in Database C. Is there any script to do this automatically. So that I can give the following to that script
List of tables in Source DB
So that the script can go to Source Db, get the table definition in that and create the same tables in Destination database.
any help is appreciated.