Subject | RE: [firebird-support] Generator as default value? |
---|---|
Author | agung wibowo |
Post date | 2005-01-24T09:56:22Z |
>I would like to use a generator to assign unique row numbers forAFAIK, we can't use generator value as default statement, but we can use
>various tables. I am familiar with the approach of defining an insert
>trigger for each table.
>Is there a simpler way to achieve this? I was hoping for one of the
>two options:
>(1) have the generator as the default value for the column, i.e.
>something like
>create table xyz ( xyzID DECIMAL(18) DEFAULT MyGenerator, ...)
them in COMPUTED BY definition, so if I'm not wrong about your meant, you
can do this :
CREATE TABLE XYZ (XYZID BIGINT COMPUTED BY
(GEN_ID(MYGENERATOR,[somevalue]))
Hope, can help you
[Non-text portions of this message have been removed]