Subject | RE: [firebird-support] How to check if table exists?! |
---|---|
Author | Si Carter |
Post date | 2005-04-20T08:41:25Z |
> -----Original Message-----Assuming table name is CUSTOMER you could use something like:
> How can I check if table exists in database using SQL?!
> Is it possible using some system tables?
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/