Subject Re: [firebird-support] Key Generator
Author Bogusław Brandys
German Gonzalez wrote:
> I'm using Ibatis and the query is in a XML file. (SQL Mapping).
>
> German
>
>
>
> On 7/11/05, Alan McDonald <alan@...> wrote:
>
>>>Hello,
>>>
>>>I wonder if there is another query to get a key from a generator and
>>>trigger already declare:
>>>
>>> SELECT gen_id(GEN_NAME, 1) FROM rdb$database
>>>
>>>I'm having problems with "rdb$database" syntax, actually with the
>>>"$" character.
>>>
>>>thanks in advance.
>>>
>>>German Gonzalez
>>
>>what language?
>>php? then use \$ or /$ I forget
>>Alan

Or create simple table and fill with exactly one record

CREATE TABLE DUMB (
ID INTEGER
);
COMMIT;
INSERT INTO DUMB(ID) VALUES(1);
COMMIT;

SELECT gen_id(GEN_NAME, 1) FROM DUMB

will work as previous.

Regards
Boguslaw