John, yes, you must use a trigger, with some variation of
select sequence.nextval into :new.column_name from dual;
Paul Baumgartel
--- John Weatherman [EMAIL PROTECTED] wrote:
OK, I RTFM and am probably just missing it. Is there an easy may to
define
a default as a NextVal? When I try,
Correct. You can't use a sequence value as a default. What we have done here is to
build before insert triggers that, when the column is null, selects the sequence into
the column from dual.
Note, this is one of those places where I haven't found a good alternative to select
from dual.
Thanks, Paul, that's what I was afaid of. Seems like default should handle
this. Oh well, maybe in 10i.
John P Weatherman
Database Administrator
Replacements Ltd.
-Original Message-
Sent: Wednesday, July 10, 2002 12:34 PM
To: Multiple recipients of list ORACLE-L
John, yes, you