'How do you get a list of tables name that contains a specific column name on Firebird?

I have to find a table (or more than one) that contains a column named 'idRec' on a Firebird database.



Solution 1:[1]

You can query the RDB$RELATION_FIELDS table for this:

select RDB$RELATION_NAME
from RDB$RELATION_FIELDS
where RDB$FIELD_NAME = 'idRec'

This will only match columns that are actually called idRec (and thus are required to be quoted when used in SQL statements). If you are actually looking for a column called IDREC (unquoted object names are stored in uppercase), use where RDB$FIELD_NAME = 'IDREC'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mark Rotteveel