Subject Re: [firebird-support] Re: Connection with Open Office 2
Author Ann W. Harrison
Robin Davis wrote:
>
> I've tried the various suggestions to no avail. I've now downloaded
> the Alpha version of Firebird 2, so could you give me any pointers
> towards creating a global autoincrement field that can work on various
> tables with different autoincrfement values - assuming that's even
> possible! ;-)

What you're looking for is

INSERT INTO <table> <field list> VALUES <list> RETURNING <list>

Use the returning clause to get the value of auto increment fields.

As an aside, having a global auto increment field in a multi-user
application where triggers and stored procedures operate in the user's
context is not a good idea.

Regards,


Ann