Hello,

For each update to a row in a particular table, I would like to store the
last user who modified it and the timestamp when it was modified. I had
thought to use Derby's nifty GENERATED ALWAYS for these:

     alter table people add lastModified GENERATED ALWAYS AS
(CURRENT_TIMESTAMP);
     alter table people add lastModifiedBy GENERATED ALWAYS AS
(CURRENT_USER);

Unfortunately, neither CURRENT_TIMESTAMP nor CURRENT_USER are permitted for
automatically generated columns (the documentation says so; I just hadn't
noticed).

Is the intent for people to do this with triggers or some other mechanism?

Thanks very much in advance!
     Peri

Reply via email to