Subject | |
---|---|
Author | Brandon Fouts |
Post date | 2002-05-17T17:24:04Z |
I am wanting to find the order or order of the relations between the tables
in a database that I am using. For instance, if i have three tables: table
1, table 2 and table 3 and the order that data should be inserted is table 2
then table 1 then table 3 to ensure referential integrity and so I don't
violate foreign key constraints. Is there a SQL statement, delphi
component, etc. that could give me this order in a list format. The reason
being is that I have about 200 tables that I need to know the exact
order/relational order of the tables for database repair. I didn't design
the db so therefore I don't know this order. The other thing is I don't
really want to have to go through manually figuring this out. I know it is
possible because the gbak utility inserts the data in this order, if it gbak
can do this there has to be some type of SQL statement that could give me
this information.
Thanks in advance
Brandon
[Non-text portions of this message have been removed]
in a database that I am using. For instance, if i have three tables: table
1, table 2 and table 3 and the order that data should be inserted is table 2
then table 1 then table 3 to ensure referential integrity and so I don't
violate foreign key constraints. Is there a SQL statement, delphi
component, etc. that could give me this order in a list format. The reason
being is that I have about 200 tables that I need to know the exact
order/relational order of the tables for database repair. I didn't design
the db so therefore I don't know this order. The other thing is I don't
really want to have to go through manually figuring this out. I know it is
possible because the gbak utility inserts the data in this order, if it gbak
can do this there has to be some type of SQL statement that could give me
this information.
Thanks in advance
Brandon
[Non-text portions of this message have been removed]