Skip to content

Instantly share code, notes, and snippets.

@VasekPurchart
Created August 15, 2013 14:24
Show Gist options
  • Save VasekPurchart/6241230 to your computer and use it in GitHub Desktop.
Save VasekPurchart/6241230 to your computer and use it in GitHub Desktop.
Zjištění závislých cizích klíčů
use INFORMATION_SCHEMA;
select TABLE_NAME,COLUMN_NAME,CONSTRAINT_SCHEMA,CONSTRAINT_NAME,
REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME from KEY_COLUMN_USAGE where
REFERENCED_TABLE_NAME = '<table>' ORDER BY CONSTRAINT_SCHEMA, CONSTRAINT_NAME;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment