select table_name, constraint_name, status, owner from all_constraints where r_constraint_name in (–get primary and unique constraints on the target table. These can be used for FK references by other tables select constraint_name from all_constraints where constraint_type in (‘P’, ‘U’) and table_name …

Oracle: Find tables referring to another Read more »

Rather than fret about how to escape 2 single quotes for example, just use the quote function and native text: QUOTE: q'{}’; vSQL := q'{ALTER TABLE DIM_ISSUE ADD (CONSTRAINT DIM_ISSUE_C9 CHECK (length(regexp_replace(UPPER(issue_name),'[ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]’,”)) = 0 AND regexp_like(issue_name,’^[ABCDEFGHIJKLMNOPQRSTUVWXYZ]+.*$’)))}’; EXECUTE IMMEDIATE(vSQL;)