DELIMITER // 
CREATE FUNCTION cfraction_count(v_pid bigint , v_ccid bigint) 
RETURNS  float(10,2)
BEGIN 
DECLARE @vars;
select  @vars = sum(cfraction) from  z where pid= v_pid and ccid = v_ccid;
return @vars;
END //
在 mysql 里这样的函数如何写?