Subject RE: [IBO] how to scan a database
Author Thomas Steinmaurer
Hello Rainer,

the correct statements using system tables are:

1) User-defined tables without views:

select rdb$relation_name from rdb$relations where ((rdb$system_flag = 0) or
(rdb$system_flag is null)) and rdb$view_source is null

2) User-defined and system tables and views:

select rdb$relation_name from rdb$relations where rdb$view_source is null

3) User-defined tables and views:

select rdb$relation_name from rdb$relations where ((rdb$system_flag = 0) or
(rdb$system_flag is null))

4) User-defined and system tables and views:

select rdb$relation_name from rdb$relations

5) A list of all fields for a given relation:

select rdb$field_name from rdb$relation_fields where rdb$relation_name =
'YOURRELATION'


Cheers
Thomas

> -----Original Message-----
> From: lastensegler@... [mailto:lastensegler@...]
> Sent: Wednesday, June 27, 2001 2:17 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] how to scan a database
>
>
> Hi,
> I intend to write a little program that scans a database on:
> - what tabels to exist (retrieving their names)
> - what fields exist in a existing tabel and so on....
>
> Since I am not very experienced in IBO I apreciate any help I can get.
>
> Rainer
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>