SELECT T1.TABLE_NAME,
T2.TABLE_NAME AS “TABLE_NAME®”,
T1.CONSTRAINT_NAME,
T1.R_CONSTRAINT_NAME AS “CONSTRAINT_NAME®”,
A1.COLUMN_NAME,
A2.COLUMN_NAME AS “COLUMN_NAME®”
FROM USER_CONSTRAINTS T1
INNER JOIN USER_CONSTRAINTS T2 ON T1.R_CONSTRAINT_NAME =
T2.CONSTRAINT_NAME
INNER JOIN USER_CONS_COLUMNS A1 ON T1.CONSTRAINT_NAME =
A1.CONSTRAINT_NAME
INNER JOIN USER_CONS_COLUMNS A2 ON T1.R_CONSTRAINT_NAME =
A2.CONSTRAINT_NAME
WHERE T2.TABLE_NAME = ‘表名’;
查看表外键
最新推荐文章于 2024-08-11 10:11:45 发布