Subject | Re: [ib-support] Returning a list of Tables & Fields that a certain domain is used in |
---|---|
Author | Lucas Franzen |
Post date | 2002-01-25T21:13:12Z |
> Hi All,IBExpert (and other tools like this) are just querying the system-tables
>
> I am need of some help here ...
>
> The Application IBEXPERT allows you to select a domain (DOM_CLIENT)
> and by clicking on a certain tab (USED BY) it will display a list of
> tables that the domain is used in (along with a the fields in each
> table that uses it).
>
> What I am wondering is:
>
> Does anyone know of the SQL that will allow me to return the results
> as above?
of the database.
Have a look at them (they all start with RDB$; in IBExpert you can go to
the db-registration : on the "additional settings" tabsheet there's a
checkbox SHOW SYSTEM TABLES).
In your case: you can query the table RDB$RELATION_FIELDS like:
SELECT
RDB$FIELD_NAME AS FIELDNAME,
RDB$RELATION_NAME AS TABLENAME
FROM RDB$RELATION_FIELDS
WHERE RDB$FIELD_SOURCE = YOUR_DOMAIN_NAME
Hth
Luc.