Subject | Re: [firebird-support] Identity |
---|---|
Author | Norman Dunbar |
Post date | 2010-12-20T16:24:02Z |
On 20/12/10 16:12, sqlsvr wrote:
You create a sequence/generator. That provides the values.
You create a trigger on your table to feed the "id" column from the
appropriate generator/sequencen when you are inserting (and only when
you are inserting).
Details of generator/sequences can be found at
http://www.firebirdsql.org/manual/generatorguide.html.
Cheers,
Norman.
--
Norman Dunbar
Dunbar IT Consultants Ltd
Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL
Company Number: 05132767
> How do I create an autoincrement identity field for each table in Firebird (simple way)?You don't! ;-)
You create a sequence/generator. That provides the values.
You create a trigger on your table to feed the "id" column from the
appropriate generator/sequencen when you are inserting (and only when
you are inserting).
Details of generator/sequences can be found at
http://www.firebirdsql.org/manual/generatorguide.html.
Cheers,
Norman.
--
Norman Dunbar
Dunbar IT Consultants Ltd
Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL
Company Number: 05132767