Subject Re: [firebird-support] List all Domains
Author Martijn Tonies
Hello Robert,

>I am now starting to look at using "DOMAINS" as part of the specification
>of columns in tables.
> In order to do this I must be able to create a list of all currently
> defined "DOMAINS" but i cannot find an sql to do this ie.
>
> SELECT *
> FROM RDB$DOMAINS??
>
> What can I do?
>
> I am using firebird 2.1

Domains are stored in RDB$FIELDS, but for table/view fields that you don't
have a domain for, a record in this table is created automatically with the
prefix
RDB$

So:

select * from rdb$fields where not (rdb$field_name like 'RDB$%')

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com