given a field called last_update datetime in the table log
a couple of triggers solved the need of keeping track of the last update time automatically inserted in the record:
create trigger log_ins after insert on log
begin
update log set lu=datetime('now') where rowid=new.rowid;
end;
create trigger log_upd after update on log
begin
update log set lu=datetime('now') where rowid=new.rowid;
end;
No comments:
Post a Comment