db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Masoud Kalali <kal...@gmail.com>
Subject Re: Are Sequences(Generators) supported?
Date Sat, 29 Apr 2006 18:51:45 GMT



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/



Mime
View raw message