Click here to Skip to main content
15,919,434 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I need to create a duplicate database and it's tables,constraints by reading from an

existing database.I have created database programically.But I need to create tables in a

particular order.In my existing database there are lot of related tables.So I need to

create parent table first then child table.Please help me.

Thanks in advance
Posted
Comments
AmitGajjar 20-Feb-12 1:37am    
Possibility of any direct way is very less. But i am also interested in the easiest solution.. nice question. :)
Jaganathan Bantheswaran 20-Feb-12 1:53am    
You can get the table details [related tables, foreign key, primary key... etc..] from XSD [XML Schema Definitions] file. Then create the tables as per the relationship. Am i right.... :)

1 solution

 
Share this answer
 
Comments
kutz 2 23-Feb-12 4:21am    
I am asking about how to create it programically
E.F. Nijboer 24-Feb-12 8:55am    
But you would use those instructions to execute the backup operation. I think you just need to create a visual tool that can be used for entering the parameters that go with it. This backup functionality is built into sql server and would be best to use it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900