Hi,
dieses Statement liefert die Tabellen mit Feldnamen:
Code:
select
A.RDB$RELATION_NAME -- Tabellenname
, E.RDB$FIELD_NAME as OnField -- FK
from RDB$REF_CONSTRAINTS B, RDB$RELATION_CONSTRAINTS A, RDB$RELATION_CONSTRAINTS C,
RDB$INDEX_SEGMENTS D, RDB$INDEX_SEGMENTS E
where (A.RDB$CONSTRAINT_TYPE = 'FOREIGN KEY') and
(A.RDB$CONSTRAINT_NAME = B.RDB$CONSTRAINT_NAME) and
(B.RDB$CONST_NAME_UQ=C.RDB$CONSTRAINT_NAME) and
(C.RDB$INDEX_NAME=D.RDB$INDEX_NAME) and
(A.RDB$INDEX_NAME=E.RDB$INDEX_NAME) and
(C.RDB$RELATION_NAME = :table_name) and
(B.RDB$DELETE_RULE = 'CASCADE')
Frank