create trigger tr_kmanterior before insert on t_consumos for each row
set new.kmanterior_c = (preview.kmatual_c);
OR
create trigger tr_kmanterior before insert on t_consumos for each row
set new.kmanterior_c = (old.kmatual_c);
I need to put in kmanterior_c
, the value of kmatual_c
, of the previous line.
I have tried with these two examples and others, the wrong calculation or wrong.