Subject RE: [firebird-support] How to check if table exists?!
Author Si Carter
> -----Original Message-----
> How can I check if table exists in database using SQL?!
> Is it possible using some system tables?

Assuming table name is CUSTOMER you could use something like:

SELECT COUNT(RDB$RELATION_NAME)
FROM RDB$RELATIONS
WHERE (RDB$RELATION_NAME = 'CUSTOMER')
AND RDB$VIEW_SOURCE IS NULL;

Will return 1 if exists else 0

Rgds

Si Carter
http://www.tectsoft.net/