标签:cat drop creat declare sel code logs limit color
//DELIMITER DROP PROCEDURE if EXISTS createAmountCount; create PROCEDURE createAmountCount() BEGIN DECLARE ss VARCHAR(20); DECLARE sqt VARCHAR(200); set ss=‘test‘; set sqt=‘select * from test WHERE 1=1 AND NAME<>‘‘‘‘ {0} ‘; select if(ss is null,sqt,CONCAT(sqt,‘and date>= ‘)); END; //DELIMITER CALL createAmountCount();
标签:cat drop creat declare sel code logs limit color
原文地址:http://www.cnblogs.com/davidwang456/p/6830703.html