gpt4 book ai didi

mysql - 即使执行存储过程 'operand should contain one column' 后也会出现无法理解的错误

转载 作者:行者123 更新时间:2023-11-29 15:14:49 25 4
gpt4 key购买 nike

DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sample`(IN `feename` VARCHAR(50), IN `feemslno` INT(11))
BEGIN

SELECT id INTO @f FROM s_menu where name='FEES' LIMIT 1;

INSERT INTO s_menu (name, mslno, parentid,url,roles)
SELECT (feename, feemslno, @f,'feeblank.php','All,Notview,sysadmin')
WHERE NOT EXISTS (SELECT * FROM s_menu WHERE url='feeblank.php'
AND name='Reports');

SELECT id INTO @c FROM s_menu where url='feeblank.php' LIMIT 1;

UPDATE s_menu SET parentid=@c WHERE url = 'fee_dues_details_with_jTable_ver3.php'
AND id!=1;
UPDATE s_menu SET parentid=@c WHERE url = 'fee_dues_summary_with_jTable_ver_3.php'
AND id!=1;
UPDATE s_menu SET parentid=@c WHERE url = 'fee_dues_summary_class_section_wise_with_jTable_ver_2.php'
AND id!=1;
UPDATE s_menu SET parentid=@c WHERE url = 'fee_dues_summary_school_wide_with_jTable_ver_2.php'
AND id!=1;
END$$
DELIMITER ;

最佳答案

删除语句中的括号SELECT (feename, Feemslno, @f,'feeblank.php','All,Notview,sysadmin'),我注意到有一个关于在你之前的问题中使用 DUAL - 我已经尝试过你的代码,如果没有使用 Dual,我会收到语法错误。

关于mysql - 即使执行存储过程 'operand should contain one column' 后也会出现无法理解的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59766178/

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