oracle table constraints

Solutions on MaxInterview for oracle table constraints by the best coders in the world

showing results for - "oracle table constraints"
Elisa
12 May 2018
1SELECT
2 	c_list.CONSTRAINT_NAME as NAME,
3 	c_src.TABLE_NAME as SRC_TABLE,
4 	c_src.COLUMN_NAME as SRC_COLUMN,
5 	c_dest.TABLE_NAME as DEST_TABLE,
6 	c_dest.COLUMN_NAME as DEST_COLUMN
7FROM ALL_CONSTRAINTS c_list, 
8    ALL_CONS_COLUMNS c_src, 
9    ALL_CONS_COLUMNS c_dest
10WHERE c_list.CONSTRAINT_NAME = c_src.CONSTRAINT_NAME
11    AND c_list.R_CONSTRAINT_NAME = c_dest.CONSTRAINT_NAME
12    AND c_list.CONSTRAINT_TYPE = 'R'
13GROUP BY c_list.CONSTRAINT_NAME,
14    c_src.TABLE_NAME,
15    c_src.COLUMN_NAME,
16    c_dest.TABLE_NAME,
17    c_dest.COLUMN_NAME;