Subject Re: [ib-support] Returning a list of Tables & Fields that a certain domain is used in
Author Martijn Tonies
Hi,

===
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?
===

select *
from rdb$relation_fields
where rdb$field_source not like 'RDB$%'

System generated domains are starting with RDB$ - if you create
some yourself, they still will show up.

select rdb$relation_name, rdb$field_name
from rdb$relation_fields
where rdb$field_source = 'MYDOMAIN'

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."