drop procedure if EXISTS sp_alm_producto_consul;
DELIMITER $$
CREATE  PROCEDURE `sp_alm_producto_consul`(IN `id_code` VARCHAR(50))
    NO SQL
BEGIN
-- select if(concat("a", code)=id_code, "si","no"), concat("a", code)
-- from tec_products;
SELECT id, code, name 
FROM tec_products 
WHERE code = concat(id_code, '') and estado = 1;

END$$
DELIMITER ;