An sql event can be conditioned

0

I have this event

CREATE DEFINER='root'@'localhot' EVENT 'prueba' 
ON SCHEDULE EVERY 1 YEAR STARTS '2018-11-23 16:35:00.000000' 
ON COMPLETION PRESERVE ENABLE 
DO UPDATE cat_marca as tabla_c 
SET tabla_c.precio = (SELECT tabla_c.precio * tabla_b.porcentaje 
FROM cat_concepto as tabla_a INNER JOIN cat_depreciacion as tabla_b ON tabla_a.id_depreciacion = tabla_b.id WHERE tabla_c.id_concepto = tabla_a.id_concepto) WHERE tabla_c.nombre_marca = 'neffos'

my question is can you condition, for example, that you update the data that is one year old, but that you do not update the data that is less than one year old?

    
asked by emmanuel gomez toledo 23.11.2018 в 23:34
source

0 answers