Created
November 1, 2017 13:03
-
-
Save jaynarayan89/26389f23234db8bac434c976f5e23800 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT concat('alter table ',table_schema,'.',table_name,' DROP FOREIGN KEY ',constraint_name,';') | |
FROM information_schema.table_constraints | |
WHERE constraint_type='FOREIGN KEY' | |
AND table_schema='!!YOUR_SCHEMA_HERE!!'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment