delimiter //
drop procedure if exists createflowtable_UL//
create procedure createflowtable_UL () BEGIN
declare tablesql varchar(300);
declare timesql varchar(20);
set timesql = CONCAT (MONTH (now()),'-',DAY (now()),'_',hour (now()));
set tablesql = CONCAT ('create table flow_agent8_job2_UL_',timesql,
'( ULthroughput FLOAT(12,4),',
'max_rate FLOAT(12,8),',
'eNB VARCHAR(20) )',
' ENGINE=MyISAM DEFAULT CHARSET=latin1');
set @s := tablesql;
prepare statement from @s;
execute statement;
END
//
delimiter ;
调用该存储过程时,怎么生成不了表?
drop procedure if exists createflowtable_UL//
create procedure createflowtable_UL () BEGIN
declare tablesql varchar(300);
declare timesql varchar(20);
set timesql = CONCAT (MONTH (now()),'-',DAY (now()),'_',hour (now()));
set tablesql = CONCAT ('create table flow_agent8_job2_UL_',timesql,
'( ULthroughput FLOAT(12,4),',
'max_rate FLOAT(12,8),',
'eNB VARCHAR(20) )',
' ENGINE=MyISAM DEFAULT CHARSET=latin1');
set @s := tablesql;
prepare statement from @s;
execute statement;
END
//
delimiter ;
调用该存储过程时,怎么生成不了表?
drop procedure if exists createflowtable_UL//
create procedure createflowtable_UL () BEGIN
declare tablesql varchar(300);
declare timesql varchar(20);
set timesql = CONCAT (MONTH (now()),'-',DAY (now()),'_',hour (now()));
set tablesql = CONCAT ('`create table flow_agent8_job2_UL_',timesql,
'`( ULthroughput FLOAT(12,4),',
'max_rate FLOAT(12,8),',
'eNB VARCHAR(20) )',
' ENGINE=MyISAM DEFAULT CHARSET=latin1;');
set @s := tablesql;
prepare statement from @s;
execute statement;
END
//
delimiter ;
drop procedure if exists createflowtable_UL//
create procedure createflowtable_UL () BEGIN
declare tablesql varchar(300);
declare timesql varchar(20);
set timesql = CONCAT (MONTH (now()),'-',DAY (now()),'_',hour (now()));
set tablesql = CONCAT ('`create table flow_agent8_job2_UL_',timesql,
'`( ULthroughput FLOAT(12,4),',
'max_rate FLOAT(12,8),',
'eNB VARCHAR(20) )',
' ENGINE=MyISAM DEFAULT CHARSET=latin1;');
set @s := tablesql;
select @sql;
prepare statement from @s;
execute statement;
END
//
delimiter ;