Posted by David Portas on 06/14/05 02:26
"sam" <samevan@hotmail.com> wrote in message
news:1118704610.463752.189370@o13g2000cwo.googlegroups.com...
>I have to import data into a empty database, that has many tables.
> some tables have to be inserted first than others due to the foreign
> keys.
>
> How do I find out the order of the tables that I have to insert data
> into?
>
> Thanks in advance!
>
> Sam
>
You need to insert to each parent table before the tables that reference it
with foreign keys. Do you have a database diagram? If not you can generate
one in Enterprise Manager and identify the dependency order from that.
--
David Portas
SQL Server MVP
--
[Back to original message]
|