Subject Re: autoincrement fields
Author legrand_legrand_63
--- In Firebird-Architect@yahoogroups.com, "paulruizendaal" <pnr@...>
wrote:
>
> I just noticed that postgres has a nifty, practical way to help
> people migrating from systems with autoincrement fields:
>
> <quote>
> Symptom/Question - How do I create a serial/auto-incrementing field?
>
> Answer -
>
> PostgreSQL supports a SERIAL data type. It auto-creates a sequence.
> For example, this:
>
> CREATE TABLE person (
> id SERIAL,
> name TEXT
> );
>
>
> is automatically translated into this:
>
>
> CREATE SEQUENCE person_id_seq;
> CREATE TABLE person (
> id INT4 NOT NULL DEFAULT nextval('person_id_seq'),
> name TEXT
> );
>
>
> CREATE SEQUENCE will enter a new sequence number generator into the
> current data base. This involves creating and initializing a new
> single-row table with the name seqname. The generator will be "owned"
> by the user issuing the command.
> </quote>
>
> Would there be any issues with doing the same for Firebird?
>
> Paul
>

Hello Paul,

a kind of after DDL could be the answer too, let's have a look to the
folowing thread:

http://tech.groups.yahoo.com/group/firebird-support/message/79884

Regards
PAscal