Subject Re: How to update table structure with SQL?
Author Emil Totev
--- In firebird-support@yahoogroups.com, "neighbour.kerry" <kerry@...> wrote:
>
...
> Now, the problems with Firebird are many. The big one is there is no IF EXISTS function. I have worked around this by using Delphi. The other problem seems to be that you cannot really ALTER a column after it is created. Or in the few cases you can, with many restrictions. There are also problems with Procedures and autoinc fields. There may be others I have yet to discover!
>
> I am almost there. I have almost everything working. My real sticking point has been the ALTER columns script. Basically, I think I will just have to give up on that and hope I will never have to alter a column! It is probably not a good thing to do on a live database anyway.
>

Firebird has the "CREATE OR ALTER" syntax for changes to tables that might be missing.
You can also get information about the existing fields from the system tables and act accordingly.