How to resolve this Trigger in Mysql?

Asked

Viewed 35 times

1

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, of error or miscalculation.

  • Which error was shown ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.