gpt4 book ai didi

mysql - 尝试导入数据库时​​程序中断

转载 作者:行者123 更新时间:2023-11-29 11:46:55 24 4
gpt4 key购买 nike

我有以下过程,当我手动导入时,由于某些未知原因,该过程会中断。

CREATE PROCEDURE `register_house`(  
IN UID CHAR(17),
IN new_username VARCHAR(16),
IN new_signature CHAR(64),
IN email VARCHAR(128),
IN postcode VARCHAR(16),
IN customer_name VARCHAR(45),
IN phone_number VARCHAR(16)
)
BEGIN
UPDATE bb.checkin SET username = new_username, signature = new_signature WHERE _site = UID;
END

我在 Mysql Workbench 中收到以下错误 -

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 11

有人可以提出问题是什么吗?

更新

按照建议,我已修改为包含 DELIMITER,现在出现以下错误:

 Error Code: 1728. Cannot load from mysql.proc. The table is probably corrupted

这些表看起来都正确,如果它们以某种方式损坏了,是否可以对其进行“反损坏”?

最佳答案

基于https://stackoverflow.com/a/639356/2381157 ,试试这个

delimiter //

CREATE PROCEDURE `register_house2`(
IN UID CHAR(17),
IN new_username VARCHAR(16),
IN new_signature CHAR(64),
IN email VARCHAR(128),
IN postcode VARCHAR(16),
IN customer_name VARCHAR(45),
IN phone_number VARCHAR(16)
)
BEGIN
UPDATE bb.checkin SET username = new_username, signature = new_signature WHERE _site = UID;
END
//

delimiter ;

它在 MySQL 5.5 中对我有用

关于mysql - 尝试导入数据库时​​程序中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34765844/

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