Subject | Re: [firebird-support] Re: Auto-increment and generators |
---|---|
Author | Milan Babuskov |
Post date | 2004-02-10T18:48:30Z |
h_urlaf wrote:
and Triggers. But I may be wrong?
--
Milan Babuskov
http://fbexport.sourceforge.net
> but that would still failYes, you are correct.
>
> INSERT INTO TEST (ID) VALUES (2); SET GENERATOR g1 TO 3;
> INSERT INTO TEST (ID) VALUES (1); SET GENERATOR g1 TO 2;
> INSERT INTO TEST (DATA) VALUES (NULL); /* oops */
> maybe an AFTER INSERT OR UPDATE trigger could set the generator toAFAIK, SET GENERATOR is treated as DDL, so you cannot embed it into SPs
> MAX(ID) if new.ID was not NULL?
and Triggers. But I may be wrong?
--
Milan Babuskov
http://fbexport.sourceforge.net