I would rather not create a table as I have a generic code that updates the database tables(deletes, inserts, modifies tables) that works with the DB's metadata and a static declaration of all the DB schema that might change as the application's version changes. I would prefer not to have to declare the generators as tables as errors might occur(such as forgetting to declare the generator or deleting by mistake) that would cause the generators tables to be deleted and the sequence to be lost!
So is this the only way for creating a generator? No built-in support for it? Is there any plan for supporting such a feature in the future, and if so when would that be?
Thanks again for any responses.
Masoud Kalali <[EMAIL PROTECTED]> wrote:
Yes It is supported , you can build a table with a field that will
automatically increment due to inserting data.
for example :
create table tinc{
idenCol integer not null generate always as identity,
}
also in case that you need sometimes to insert some values for the
identity field you can use :
create table tinc{
idenCol integer not null generate by default as identity,
}
AFAIR , in Interbase we defined a generator and then we used that
generator in a trigger which put a new value for a column , Am i correct ?
it is a long time that i did not used that Interbase/FierBird thingy
Panayiotis Vlissidis wrote:
> Hello all!
>
> I just found out about derby( through Java DB) and I would like to know
> if the feature of Oracle sequences(or Firebird generators) is supported
> in order to automatically retreive and store a unique number, is
> supported in any way?
>
> Thanks in advance.
>
> Panayiotis Vlissidis
--
Regards , Masoud Kalali
http://weblogs.java.net/blog/kalali/
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase