Subject Re: [firebird-support] Altering tables
Author Almond
At 13:02 04/02/06 +0100, you wrote:
>Hi,
>
> > A lazy way which I use often. Try at your own risk.
> >
> > create domain NAME_LONG as varchar(80);
> > update RDB$RELATION_FIELDS
> > set RDB$FIELD_SOURCE = 'NAME_LONG'
> > where RDB$RELATION_NAME = 'STOCK'
> > and RDB$FIELD_NAME = 'STOCK_NAME';
>
>Why are you doing this?
>
>Firebird has a statement ALTER TABLE that allows
>you to do this without messing around with the system
>tables.

I'm currently using 1.03, the alter table statement cannot change the data
type as requested. Create a new field to copy is somewhat difficult if the
old field existed at procedure, trigger or other dependencies.

Update the system table is always not a good practice ;). So, I confess
that I am a lazy guy.

>With regards,
>
>Martijn Tonies
>Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
>Server.
>Upscene Productions
>http://www.upscene.com
>
>
>
>
>Yahoo! Groups Links
>
>
>
>