db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Selvia <ssel...@gmail.com>
Subject Before Insert Trigger question
Date Thu, 29 Mar 2012 22:12:29 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);

Thanks,

Scott

Mime
View raw message