select
referent.constraint_name as fk_name,
referent.update_rule,
referent.delete_rule,
kcol_usage.table_name as fk_table_name,
kcol_usage.column_name as fk_column_name,
kcol_usage1.table_name as pk_table_name,
kcol_usage1.column_name as pk_column_name
from
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS referent
join INFORMATION_SCHEMA.KEY_COLUMN_USAGE kcol_usage
on (referent.constraint_name = kcol_usage.constraint_name) join INFORMATION_SCHEMA.KEY_COLUMN_USAGE kcol_usage1 on (referent.unique_constraint_name = kcol_usage1.constraint_name)