db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McFall <mcf...@hope.edu>
Subject Sequences as default values for a column
Date Fri, 08 Jul 2011 19:59:47 GMT
>From what I can see in the Derby documentation, it's not possible to specify
the value of a sequence as the default value for a column.  Is my reading of
this correct?

I've seen solutions online for Oracle, which also supports sequences, that
suggest using a before insert trigger to modify the value of a column with a
sequence value if the value is not specified.  This seems like it's more
work than it should be; specifying it as a default in the table definition
makes much more sense to me.

Thanks for any insights you have,
Ryan

-- 
Ryan McFall
Associate Professor of Computer Science
Hope College
Holland, MI  49423
Email: mcfall@hope.edu
Phone: 616-395-7952
Fax: 616-395-7123
http://www.hope.edu/cs/mcfall/

Mime
View raw message