Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: View That Shows Referential Constraints?
Tim Romano escribió:
> =
> The view USER_CONS_COLUMNS gives CONSTRAINT_NAME, TABLE_NAME, and
> COLUMN_NAME, but in which view are the foreign table_name and
> foreign key column to be found?
select constraint_name, table_name, column_name, column_position from user_cons_columns =
where constraint_name in (select r_constraint_name from user_constraints
where constraint_name=<your_constraint>);if you do:
Name Null? Type ------------------------------- -------- ---- OWNER NOT NULL VARCHAR2(30) CONSTRAINT_NAME NOT NULL VARCHAR2(30) CONSTRAINT_TYPE VARCHAR2(1) TABLE_NAME NOT NULL VARCHAR2(30) SEARCH_CONDITION LONG R_OWNER VARCHAR2(30) R_CONSTRAINT_NAME VARCHAR2(30) <<<< referenced constraint name DELETE_RULE VARCHAR2(9) STATUS VARCHAR2(8)
Hope this help.
-- =
Julio Negueruela
DBA Servicio Informático
Universidad de La Rioja - Spain Telf: 941-299179 Fax: 941- 299180
![]() |
![]() |