Subject | Re: [firebird-support] Deleting all foreign keys of my database |
---|---|
Author | Milan Babuskov |
Post date | 2006-02-14T20:09:05Z |
Lorenzo Lamas wrote:
select 'ALTER TABLE '||r.rdb$relation_name
||' DROP CONSTRAINT '||r.rdb$constraint_name||';'
from rdb$relation_constraints r
where (r.rdb$constraint_type='FOREIGN KEY')
Then copy/paste the results and execute.
--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org
> Is it there a sentence that lets me delete all foreign keys in a database?Do this:
select 'ALTER TABLE '||r.rdb$relation_name
||' DROP CONSTRAINT '||r.rdb$constraint_name||';'
from rdb$relation_constraints r
where (r.rdb$constraint_type='FOREIGN KEY')
Then copy/paste the results and execute.
--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org