Ver originalDELIMITER$$DROP TRIGGER IF EXISTS actualizareferncia$$CREATE TRIGGER BEFORE INSERTactualizareferncia ON ventas_valery FOR EACH ROWBEGIN SET new.correlativo_id = 1000 + (SELECT `AUTO_INCREMENT` FROM `information_schema`.`tables` WHERE `schema_name` = DATABASE() AND `table_name` = 'ventas_valery');END$$