select a.table_name,a.COLUMN_NAME,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 b.r_constraint_name=c.constraint_name
and (c.table_name='CD_BAS_WELL_DATA' or a.table_name ='CD_BAS_WELL_DATA');