Subject | Re: [firebird-support] How do return the number of object in a Firebird database |
---|---|
Author | Josef Kokeš |
Post date | 2013-07-17T12:04:15Z |
On 17.7.2013 13:55, Softtech Support wrote:
SELECT COUNT(*)
FROM rdb$procedures
WHERE rdb$system_flag=0
-- functions
SELECT COUNT(*)
FROM rdb$functions
WHERE rdb$system_flag=0
-- indices
SELECT COUNT(*)
FROM rdb$indices
WHERE rdb$system_flag=0
-- tables
SELECT COUNT(*)
FROM rdb$relations
WHERE rdb$system_flag=0
AND rdb$view_blr IS NULL
-- views
SELECT COUNT(*)
FROM rdb$relations
WHERE rdb$system_flag=0
AND rdb$view_blr IS NOT NULL
Josef
>-- stored procedures
>
> Greetings All,
>
> v1.5.3
>
> I need to know how many tables, indicies, functions, stored procedures,
> etc are in my Firebird database.
>
> Is there a quick way to determine this?
SELECT COUNT(*)
FROM rdb$procedures
WHERE rdb$system_flag=0
-- functions
SELECT COUNT(*)
FROM rdb$functions
WHERE rdb$system_flag=0
-- indices
SELECT COUNT(*)
FROM rdb$indices
WHERE rdb$system_flag=0
-- tables
SELECT COUNT(*)
FROM rdb$relations
WHERE rdb$system_flag=0
AND rdb$view_blr IS NULL
-- views
SELECT COUNT(*)
FROM rdb$relations
WHERE rdb$system_flag=0
AND rdb$view_blr IS NOT NULL
Josef