Subject | How to list the tables and field wich use the primary key from one table as FK |
---|---|
Author | harveypekkar |
Post date | 2012-07-30T18:55:29Z |
Hello ,
I am trying to query the system table of firebird ( version 2.1) to obtain the list of table and fields wich use the primary key from another as foreign key , the goal is after a database corruption , and after having mend the corrupt records , to recopy from a backup with new ID and after updating in others tables using the ID as a reference by the new one ( I hope i'm clear enough !! ) , this part works fine but I want to automize the process a little and in case of a new table corruption , being able to list the table that use the primary key as a reference to refresh them .
Best regards ,
I am trying to query the system table of firebird ( version 2.1) to obtain the list of table and fields wich use the primary key from another as foreign key , the goal is after a database corruption , and after having mend the corrupt records , to recopy from a backup with new ID and after updating in others tables using the ID as a reference by the new one ( I hope i'm clear enough !! ) , this part works fine but I want to automize the process a little and in case of a new table corruption , being able to list the table that use the primary key as a reference to refresh them .
Best regards ,