EVENTS OR REPLACE in MySQL

1

I have the following table

tabla prueba1
id
capital_real
interes
capital_total as (capital_real+interes)

so far so good.

It turns out that I want each time interval to be calculating the interest with the formula (capital_real * 15 * 1/36000)

and my event is:

CREATE OR REPLACE EVENT calcular_intereses
ON SCHEDULE EVERY 5 SECOND ON COMPLETION PRESERVE
DO
 UPDATE prueba1 set interes= (capital_real*15*1/36000)

The event is created but for some reason I am not running, I mean that the 5 seconds pass and it follows the same value 0 in my table.

    
asked by Nor 24.12.2018 в 07:43
source

0 answers