Subject | How to check if a FIELD exists?! |
---|---|
Author | Carol Milius |
Post date | 2005-04-20T17:54:24Z |
Hi,
I´ve read the posting about check if a table exists and I am wondering if
the systems table can return if a field of a table already exists..
Is it possible?
TIA,
Carol Milius
I´ve read the posting about check if a table exists and I am wondering if
the systems table can return if a field of a table already exists..
Is it possible?
TIA,
Carol Milius
> 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/