gpt4 book ai didi

mysql存储过程错误: missing semicolon

转载 作者:可可西里 更新时间:2023-11-01 06:34:39 25 4
gpt4 key购买 nike

我有以下存储过程。这是给我一些错误

DROP procedure IF exists getQueueMessage;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `getQueueMessage`(msg varchar(100))
BEGIN

SELECT `Name` FROM queues WHERE Id IN (
SELECT PhysicalQueueId FROM indexqueuemaps WHERE ConditionFieldValue = msg)
END
END$$
DELIMITER ;

它给我缺少分号错误。不知道为什么会出现此错误。有人可以帮助我吗?

最佳答案

像这样尝试:

DROP procedure IF exists getQueueMessage;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `getQueueMessage`(msg varchar(100))
BEGIN

SELECT `Name` FROM queues WHERE Id IN (
SELECT PhysicalQueueId FROM indexqueuemaps WHERE ConditionFieldValue = msg);
END$$
DELIMITER ;

关于mysql存储过程错误: missing semicolon,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27420515/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com