Subject Re: [firebird-support] Deleting all foreign keys of my database
Author Milan Babuskov
Lorenzo Lamas wrote:
> 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