Subject | RE: [firebird-support] Re: Schema query? Need help to get started. |
---|---|
Author | Graeme Edwards |
Post date | 2005-06-26T07:17:57Z |
This query, taken from a link sent in a previous newsgroup posting
will give the names of the non-system tables, excluding views.
SELECT RDB$RELATION_NAME AS TABLE_NAME
FROM RDB$RELATIONS
WHERE RDB$SYSTEM_FLAG = 0
AND RDB$VIEW_SOURCE IS NULL
Graeme
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Adam
Sent: Sunday, 26 June 2005 5:02 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Schema query? Need help to get started.
Hi Thomas,
source build. I doubt Borland bothered to publish an exhaustive list
of every system table and field, so feel free to document anything you
find and contribute it. The documentation will come eventually, but at
the moment it is pretty high level.
will not find a hidden table called RDB$GET_THE_TABLE_NAMES.
In two minutes I wrote this
SELECT RDB$RELATION_NAME
FROM RDB$RELATIONS
WHERE RDB$RELATION_NAME NOT LIKE 'RDB$%'
AND RDB$RELATION_NAME NOT IN
(
SELECT RDB$VIEW_NAME
FROM RDB$VIEW_RELATIONS
)
ORDER BY RDB$RELATION_NAME
It wasn't rocket science (and there may be a better way to do it), I
simply noticed that the RDB$RELATIONS.RDB$RELATION_NAME was pretty
close, it just also included the views and the system tables.
Any way, that should give you a start.
Adam
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
will give the names of the non-system tables, excluding views.
SELECT RDB$RELATION_NAME AS TABLE_NAME
FROM RDB$RELATIONS
WHERE RDB$SYSTEM_FLAG = 0
AND RDB$VIEW_SOURCE IS NULL
Graeme
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Adam
Sent: Sunday, 26 June 2005 5:02 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Schema query? Need help to get started.
Hi Thomas,
> My main problem is:Borland open sourced Interbase and Firebird is based on that open
>
> * Lack of documentation. For a lof of the sutff I am pretty lost.
source build. I doubt Borland bothered to publish an exhaustive list
of every system table and field, so feel free to document anything you
find and contribute it. The documentation will come eventually, but at
the moment it is pretty high level.
> * Where the heck is a list of all TABLES? I can find fields, relations,The RDB$ isn't simply a convenience for people such as yourself, you
> but no RDB$ table that contains the TABLES themseves.
will not find a hidden table called RDB$GET_THE_TABLE_NAMES.
In two minutes I wrote this
SELECT RDB$RELATION_NAME
FROM RDB$RELATIONS
WHERE RDB$RELATION_NAME NOT LIKE 'RDB$%'
AND RDB$RELATION_NAME NOT IN
(
SELECT RDB$VIEW_NAME
FROM RDB$VIEW_RELATIONS
)
ORDER BY RDB$RELATION_NAME
It wasn't rocket science (and there may be a better way to do it), I
simply noticed that the RDB$RELATIONS.RDB$RELATION_NAME was pretty
close, it just also included the views and the system tables.
Any way, that should give you a start.
Adam
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]