Subject | Re: [firebird-support] Re: What is Generator |
---|---|
Author | Alan.Davies@aldis-systems.co.uk |
Post date | 2007-05-23T08:54:44Z |
This creates it and sets the number to 1032 - you can do this in a sql editor
CREATE GENERATOR LAST_INVOICE;
SET GENERATOR LAST_INVOICE TO 1032;
This uses it and increments invoice by 1
update yourtable
set invoice=gen_id(last_invoice,1) // 1033
This is fundamental to any sql system (even though the name changes)
and you should understand this and a lot more before attempting any
development.
hth
--
Alan J Davies
Aldis
Quoting yogiyang007 <yogiyang007@...>:
CREATE GENERATOR LAST_INVOICE;
SET GENERATOR LAST_INVOICE TO 1032;
This uses it and increments invoice by 1
update yourtable
set invoice=gen_id(last_invoice,1) // 1033
This is fundamental to any sql system (even though the name changes)
and you should understand this and a lot more before attempting any
development.
hth
--
Alan J Davies
Aldis
Quoting yogiyang007 <yogiyang007@...>:
> Hello Martijn,
>
> I already have your answer.
>
> I want explanation as to how one should create Generator. How canone
> make the Generator generate a unique value which will never get repeated.
>
> Thanks,
>
>
> --- In firebird-support@yahoogroups.com, "Martijn Tonies"
> <m.tonies@...> wrote:
>>
>>
>>
>> > What is Generator?
>>
>> I'm not gonna answer that one again.
>>
>> Martijn Tonies
>> Database Workbench - development tool for Firebird and more!
>> Upscene Productions
>> http://www.upscene.com
>> My thoughts:
>> http://blog.upscene.com/martijn/
>> Database development questions? Check the forum!
>> http://www.databasedevelopmentforum.com
>>
>
>
>