select 'alter table ',tabschema,'.',tabname, ' DROP Foreign key ', constname, ' ;' from syscat.tabconst where tabschema='URschema' and type='F' > script.dml
this will give you a file called script.dml which will have all the ALTER Table commands for all tables in ur schema with a foreign key. You can check the script before you run it so you can be sure thers nuthing wrong
Bye
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.