db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v2cg4ss <ssel...@datamentors.com>
Subject Create Before Insert Trigger
Date Fri, 30 Mar 2012 00:41:32 GMT

I'm trying to assign values automatically to a row prior to the row
being inserted.  I have no problem doing this with MySQL or Oracle,
etc...

However in Derby I was trying issued the following statement and the
last_update_uid is populated with the content of the value in the
insert statement.  How can this be done in Derby?

create trigger clients_trigger
 no cascade before insert on clients
 referencing new as newrow
 for each row mode db2sql
 values (newrow.last_update_uid = CURRENT_USER, newrow.last_update_ts
= CURRENT_TIMESTAMP);

-- 
View this message in context: http://old.nabble.com/Create-Before-Insert-Trigger-tp33544898p33544898.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message