废话少说直接看代码。不明白的就留言
create procedure sm_creatMonthTbProc(mdate varchar (8))
begin
declare sm_results_name varchar(30);
set @sm_results_name = concat('sm_results_',mdate);
set @csql = concat("create table if not exists ",@sm_results_name , " (ssh_id int(20) NOT NULL,`result` text,`testime` bigint(20) NOT NULL default '0', `mid` bigint(20) NOT NULL, PRIMARY KEY (`ssh_id`,`testime`,`mid`),KEY ",@sm_results_name,"_index01 (`ssh_id`), KEY ",@sm_results_name,"_index0......
阅读全文