| 1. |
How To Drop All Foreign Keys In Database? |
|
Answer» Deleting all foreign keys can be done by querying the system tables and droping them one by one. If you use Firebird 2 or higher, it can be done with a SINGLE SQL statement: set term!!; EXECUTE BLOCK RETURNS (stmt VARCHAR(1 000)) AS set term; !! If you use Firebird i .x, you can run the following query to get statements to execute and then copy/paste the RESULT and execute: Deleting all foreign keys can be done by querying the system tables and droping them one by one. If you use Firebird 2 or higher, it can be done with a single SQL statement: set term!!; EXECUTE BLOCK RETURNS (stmt VARCHAR(1 000)) AS set term; !! If you use Firebird i .x, you can run the following query to get statements to execute and then copy/paste the result and execute: |
|