在linux下执行以下SQL语句,会报以下的错误,在windows下是不报错的。
youhavaanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfo...
you hava an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
SQL:
/* Create Proc创建存储过程(已缴费的学员除去已经开始学习的学生,插入到未登录人表中)。*/
create procedure proc_stattologondays_user(IN X INTEGER(2))
BEGIN
/*清空未登录人表*/
delete from es_stat_logondays_user;
commit;
/*把符合条件的数据插入到未登录人表中*/
insert into es_stat_logondays_user(ADMIN_ID,COURSE_ID,ACCOUNT,TRUE_NAME,MOBILE,FINISH_TIME,COURSE_NAME,TOTAL_COUNT
)select t.adminId,t.courseId,t.account,t.trueName,t.mobile,t.finishTime,t.courseName,t.totalCount
from view_stattologondays_user t WHERE NOT EXISTS(select 1 from es_stu_record e
where t.adminId=e.admin_id and t.courseId=e.course_id and e.action_type=6 group by e.admin_id,e.course_id);
commit;
END; 展开
check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
SQL:
/* Create Proc创建存储过程(已缴费的学员除去已经开始学习的学生,插入到未登录人表中)。*/
create procedure proc_stattologondays_user(IN X INTEGER(2))
BEGIN
/*清空未登录人表*/
delete from es_stat_logondays_user;
commit;
/*把符合条件的数据插入到未登录人表中*/
insert into es_stat_logondays_user(ADMIN_ID,COURSE_ID,ACCOUNT,TRUE_NAME,MOBILE,FINISH_TIME,COURSE_NAME,TOTAL_COUNT
)select t.adminId,t.courseId,t.account,t.trueName,t.mobile,t.finishTime,t.courseName,t.totalCount
from view_stattologondays_user t WHERE NOT EXISTS(select 1 from es_stu_record e
where t.adminId=e.admin_id and t.courseId=e.course_id and e.action_type=6 group by e.admin_id,e.course_id);
commit;
END; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询