db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "firstname lastname" <supermai...@fastmail.fm>
Subject Re: can derby have a "sequence" column?
Date Sat, 17 Sep 2005 14:52:38 GMT

Good example but, how do insert a row to this table from JDBC ? Using
ij, it's
just a matter of using the DEFAULT parameter, however, the JDBC
preparedstatement
class has no setDefault() method. 

On Fri, 16 Sep 2005 20:18:04 -0700, "Ali Demir" <demir4@yahoo.com> said:
> Yes. For example:
> 
> CREATE TABLE GROUPS(
>    ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (start with 0, 
> increment by 1),
>    NAME VARCHAR(25) NOT NULL,
>    DESCRIPTION VARCHAR(255),
>    PRIMARY KEY (ID)
> )
> 
> Regards,
> Suavi Demir
> 
> At 06:52 PM 9/16/2005, you wrote:
> >If I remember correctly, Oracle can define a column as being a
> >"sequence", which is a garaunteed unique integer for each record. Can
> >derby do this? A create table example would be nice.
> >--
> >   firstname lastname
> >   supermail99@fastmail.fm
> 
> 
-- 
  firstname lastname
  supermail99@fastmail.fm

-- 
http://www.fastmail.fm - Access your email from home and the web


Mime
View raw message