mysql创建函数样例
2018-01-18 本文已影响6人
Eric_Zeng
CREATE PROCEDURE zhixiao_acct.temp_proc1(leibie varchar(20),begin_date varchar(20),end_date varchar(20))
BEGIN
if leibie='电话' then
SELECT COUNT(*) FROM cc_data.ipg_tel where stdate>=begin_date and stdate<=end_date;
end if;
END
call zhixiao_acct.temp_proc1('电话','20180102','20180102')