gpt4 book ai didi

mysql - Mysql声明错误

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

DELIMITER //

create procedure del()
begin
declare p_balance decimal(20,4), p_crdr bit, p_debit decimal(20,4), p_credit decimal(20,4);
end //

DELIMITER ;
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 ' p_crdr bit, p_debit decimal(20,4), p_credit decimal(20,4); end' at line 3

最佳答案

不能在一个语句中声明多个变量

DELIMITER //

create procedure del()
begin
declare p_balance decimal(20,4);
declare p_crdr bit;
declare p_debit decimal(20,4);
declare p_credit decimal(20,4);
end //

DELIMITER ;

关于mysql - Mysql声明错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20066711/

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