Subject Re: [firebird-support] Checking if a table exists ...
Author Helen Borrie
At 11:33 AM 31/03/2004 +0000, you wrote:
>How can I check, inside a stored procedure as well as from an
>application, if a specific table or view or procedure or any other
>object exists in the database?

Tables and views:
SELECT 1 FROM RDB$RELATIONS
WHERE RDB$RELATION_NAME = ?

SELECT 1 FROM RDB$PROCEDURES
WHERE RDB$PROCEDURE_NAME = ?

Returns 1 if the object exists, null if not.

/hb