Subject Re: [IBO] Change pri key data type to auto increment
Author Thomas Steinmaurer
> I created my tables without specifying automatic numbering (incrementing) of key fields (type integer). I now want to go back and fix that. Here is what I am using in IB_SQL:
>
> alter table units alter column kunit auto_number primary key
>
> IB does not like the data type. Literature refers to autonumber and auto_increment. Those don't work either.

There is no auto-increment data type in InterBase/Firebird. This is done
differently in IB/FB, namely with a generator and a BEFORE INSERT
trigger. Look here for an example: http://www.firebirdfaq.org/faq29/

--
With regards,
Thomas Steinmaurer
http://www.upscene.com/