Last active
December 28, 2015 11:55
-
-
Save nishitpatel/b3043e2cf29bb44f2288 to your computer and use it in GitHub Desktop.
MySql Commands.
This file contains hidden or 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
Command 1: Display all foriegn key constraint related to table | |
Query: select TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where REFERENCED_TABLE_NAME = 'outlets' | |
Command 2: Drop Foriegn Key Constraint related to table | |
Query: ALTER TABLE 'Table Name' DROP FOREIGN KEY 'Foriegn Key Name' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment