Subject | How to know if a field already exists on a table |
---|---|
Author | Carol Milius |
Post date | 2005-03-24T14:52:56Z |
Hi,
(First) How to know if a field already exists on a table?
Is this possible?
Select AFIELD
From SOMEWHERE_ON_THE_DATABASE
If result is not null, the field exists?
(Second) **If** the question above is valid,
can I implement a stored procedure to check existence of fields on tables?
MY_STORED_PROCEDURE
IN_Parameteres:
AField // the name of the field
ATable // then name of the table
OUT_Parameters:
AResult //something to say if the field exists or not
Select AField
From ATable
In :AResult
Thanks,
Carol
(First) How to know if a field already exists on a table?
Is this possible?
Select AFIELD
From SOMEWHERE_ON_THE_DATABASE
If result is not null, the field exists?
(Second) **If** the question above is valid,
can I implement a stored procedure to check existence of fields on tables?
MY_STORED_PROCEDURE
IN_Parameteres:
AField // the name of the field
ATable // then name of the table
OUT_Parameters:
AResult //something to say if the field exists or not
Select AField
From ATable
In :AResult
Thanks,
Carol