Subject | Re: [ib-support] more questions on use of generators |
---|---|
Author | Martijn Tonies |
Post date | 2002-11-12T18:20:18Z |
>DUAL
> >Sorry, to clarify I meant a SELECT in the form of
> >SELECT <function> as in SELECT LAST_INSERT_ID()
>
> What does that mean if you've got triggers which
> cascade and cause other inserts? Which is the last
> insert?
>
> >which
> >makes intuitive sense to me as opposed to Firebird's:
> >
> >select gen_id(GENNAME, 0) as GenVal from RDB$Database
> >
> >which I can't figure out how it works because
> >gen_id(GENNAME,n) does not return a value by itself,
>
> It does in a complete select statement. It behaves like
> other functions - any of the UDF functions for example,
> or substring - they all need to be referenced in a query
> expression...
>
> >nor does there seem to be any entries in RDB$Database
> >if one does a 'select * from RDB$Database'.
>
> Yes, there's one tuple in rdb$database and it contains
> the next available relation (i.e. table) id. The rdb$database
> table is guaranteed to have exactly one entry and it's used
> like the Oracle pseudo table called.... called.... called...
> Damn, I hate senility.
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com
Firebird Workbench - the developer tool for Firebird
http://www.upscene.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."