Subject Re: List of Tables
Author rj1102
--- In firebird-support@yahoogroups.com, "buppcpp" <buppcpp@y...> wrote:
> What SQL can I run to get a resultset of Tables within the database?
>
> RDB$RELATIONS has tables and views, but I can't see any way to
> seperate them.

Use:

SELECT rdb$relation_name "TableName"
FROM rdb$relations
WHERE rdb$view_source IS NULL AND COALESCE(rdb$system_flag, 0) = 0

To get all views:

SELECT rdb$relation_name "ViewName"
FROM rdb$relations
WHERE rdb$view_source IS NOT NULL AND COALESCE(rdb$system_flag, 0) = 0

- Robert