Tuesday, December 14, 2010

List all user table names in Firebird

Following SQL query will give you names of all the user defined tables in a Firebird database.

SELECT rdb$relation_name AS "Table Name"
FROM rdb$relations
WHERE rdb$view_blr IS NULL AND (rdb$system_flag IS NULL OR rdb$system_flag = 0);

rdb$system_flag of 0 or NULL identifies a user table or view and rdb$view_blr being NULL identifies that it is a TABLE.

2 comments:

Unknown said...

Thank you Sanjay,
it helped me lot, thanks a lot.
But it works only for one target i.e. x86 but for me it should work for multiple targets. Could you help me to resolve the issue.
Targets are as follows,
x86,
ppcbe
armle

Unknown said...

Thank you Sanjay,
it helped me lot, thanks a lot.
My requirement as follows, "- Build of the global makefile for command line generated from the Visual Studio 2010 environment"

Can we create "make file" from VS2010 tool?

Thanks a lot in advance.