Subject | Re: [ib-support] more questions on use of generators |
---|---|
Author | Ann W. Harrison |
Post date | 2002-11-11T17:07:11Z |
At 12:04 AM 11/12/2002 +0800, Jon Perez wrote:
gen_id is a value expression. A select
without a from is like a faucet without a
water main?
Regards,
Ann
www.ibphoenix.com
We have answers.
>In isql, why is:Because select requires a data source and
>
>select gen_id(GENNAME, 0) as GenVal from RDB$Database
>
>needed to get the value of a generator instead
>of a simple:
>
>select gen_id(GENNAME, 0)
>
>as is the case with MySQL...?
gen_id is a value expression. A select
without a from is like a faucet without a
water main?
>Also, when using SQL embedded in another language (I'mSee below.
>using Python kinterbasdb), if one wants to be able to
>know what number was generated, is it recommended to get
>this value first via the above method and then manually
>include it in an insert instead of using a before insert
>trigger to do it automatically?
>Or is there a way to use the before insert trigger methodNo.
>and still be able to get the last generated value
>reliably even in a multi-user environment?
Regards,
Ann
www.ibphoenix.com
We have answers.