创建表:
create table t_test
(
t_starttime int,
t_endtime int,
t_nodeid int,
t_direct varchar(20),
t_mos int
)存储过程:
CREATE PROCEDURE mysp
(
starttime int,
endtime int,
nodeid int,
direct varchar(20),
minmos int,
maxmos int,
tname varchar(64)
)
BEGIN
    SET @x = concat('SELECT * FROM `',tname,'` where t_endtime between ',starttime,' and ',endtime,' and t_nodeid= ',nodeid,' and t_direct = `',direct,'` and t_mos between ',minmos,' and ',maxmos);
    prepare s1 from @x;
    execute s1;
    deallocate prepare s1;
ENDcall mysp的时候报错,哪位老大给指点下