Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
select a.column_name,
a.table_name,
'REFERS',
c.table_name,
c.column_name
from user_cons_columns a,
user_constraints b,
user_cons_columns c
where a.constraint_name = b.constraint_name
and a.table_name = <TABLE_NAME>
and b.table_name = <TABLE NAME>
and b.r_constraint_name = c.constraint_name
and b.constraint_type = 'R';
create table temp_gunj_1
(
P1_COL1 NUMBER,
G1_COL2 NUMBER,
G1_COL3 NUMBER
);
create table temp_gunj_2
(
P2_COL1 NUMBER
G2_COL2 NUMBER NOT NULL,
G2_COL3 NUMBER NOT NULL,
G2_COL4 NUMBER
);
alter table temp_gunj_2 add constraint pk_temp_gunj_2
primary key (g2_col2, g2_col3) enable;
alter table temp_gunj_1 add constraint fk_temp_gunj_1
FOREIGN KEY (g1_col2,g1_col3)
references temp_gunj_2 (g2_col2,g2_col3);
COLUMN_NAME TABLE_NAME 'REFER TABLE_NAME COLUMN_NAME
----------- ----------- ------ ---------- ------------
G1_COL2 TEMP_GUNJ_1 REFERS TEMP_GUNJ_2 G2_COL2
G1_COL3 TEMP_GUNJ_1 REFERS TEMP_GUNJ_2 G2_COL2
G1_COL2 TEMP_GUNJ_1 REFERS TEMP_GUNJ_2 G2_COL3
G1_COL3 TEMP_GUNJ_1 REFERS TEMP_GUNJ_2 G2_COL3
select c.table_name,
c.column_name,
'IS REFERRED BY',
a.column_name,
a.table_name
from user_cons_columns a,
user_constraints b,
user_cons_columns c
where a.constraint_name = b.constraint_name
and c.table_name = 'TABLE_NAME'
and b.r_constraint_name = c.constraint_name
and b.constraint_type = 'R';
TABLE_NAME COLUMN_ 'ISREFERREDBY' COLUMN_NAME TABLE_NAME
NAME
----------- ------- -------------- ----------- ----------
TEMP_GUNJ_2 G2_COL2 IS REFERRED BY G1_COL2 TEMP_GUNJ_1
TEMP_GUNJ_2 G2_COL2 IS REFERRED BY G1_COL3 TEMP_GUNJ_1
TEMP_GUNJ_2 G2_COL3 IS REFERRED BY G1_COL2 TEMP_GUNJ_1
TEMP_GUNJ_2 G2_COL3 IS REFERRED BY G1_COL3 TEMP_GUNJ_1