高手来。速度结贴
YSEE 2013-01-24 12:36:22 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 里这样的函数如何写?