Skip to content

Instantly share code, notes, and snippets.

@rodrigobertin
Created July 14, 2022 15:58
Show Gist options
  • Save rodrigobertin/277d7dba5603bf6153ee6afb265c1be6 to your computer and use it in GitHub Desktop.
Save rodrigobertin/277d7dba5603bf6153ee6afb265c1be6 to your computer and use it in GitHub Desktop.
show FK
SELECT
TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
FROM
INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE
REFERENCED_TABLE_SCHEMA = 'dms_local' AND
REFERENCED_TABLE_NAME = 'panel__planes';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment