这个mysql存储过程有什么问题?

时间:2010-04-14 11:35:15

标签: mysql stored-procedures

我使用以下mysql过程,

DROP PROCEDURE IF EXISTS `allied`.`GetRegistrationData`$$
CREATE DEFINER=`allied`@`%` PROCEDURE `GetRegistrationData`()

BEGIN
 select aboutUsId,name from aboutus where isDeleted=0
 select ageId,name from age where isDeleted=0
 select desiredsetId,name from desiredsetting where isDeleted=0
 select disciplineId,name from discipline where isDeleted=0
 select employeementId,name from employeement where isDeleted=0
 select salutationId,name from salutation where isDeleted=0
 select timeId,name from timetocall where isDeleted=0
END$$

DELIMITER ;

当我执行此操作时出现错误,

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds 
to your MySQL server version for the right syntax to use near 
'select ageId,name from age where isDeleted=0
select desiredsetId,name from desir' at line 4

任何建议......

2 个答案:

答案 0 :(得分:3)

你错过了每个SELECT

末尾的分号

答案 1 :(得分:2)

您只需要用分号终止SELECT语句,即可修复该错误。