Loading

Oracle查看约束脚本

SET LINES 200
COL OWNER FOR A20
COL TABLE_NAME FOR A20
COL CONSTRAINT_TYPE FOR A20
COL CONSTRAINT_NAME FOR A20
COL SEARCH_CONDITION FOR A25
COL COLUMN_NAME FOR A20
COL POSITION FOR 9
SELECT A.OWNER,
A.TABLE_NAME,
A.CONSTRAINT_NAME,
A.CONSTRAINT_TYPE,
A.SEARCH_CONDITION,
B.COLUMN_NAME,
B.POSITION
FROM DBA_CONSTRAINTS A
JOIN DBA_CONS_COLUMNS B
ON (A.CONSTRAINT_NAME = B.CONSTRAINT_NAME)
where A.OWNER=UPPER('&OWNER') AND A.TABLE_NAME=UPPER('&TABLE_NAME');

 

 

 

posted @ 2022-05-17 17:01  李行行  阅读(53)  评论(0编辑  收藏  举报