欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

delimiter mysql报错_MySql中的DELIMITER错误

发布时间:2025/4/16 51 豆豆
生活随笔 收集整理的这篇文章主要介绍了 delimiter mysql报错_MySql中的DELIMITER错误 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

我使用以下sql:

DELIMITER $$

DROP PROCEDURE IF EXISTS `get_auto_increment_settings`$$

CREATE PROCEDURE `get_auto_increment_settings`()

BEGIN

select @@global.auto_increment_offset as 'offset', @@global.auto_increment_increment as 'increment' ;

END $$

DELIMITER ;

我将其存储在db_auto_increment_settings_procedure.sql中,当我尝试从ant执行此操作时,我面临以下错误:

[sql] Executing resource: /mysql/install/db_auto_increment_settings_procedure.sql

[sql] Failed to execute: DELIMITER

[sql] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'DELIMITER' at line 1

[sql] Failed to execute: DELIMITER ;

[sql] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'DELIMITER' at line 1

《新程序员》:云原生和全面数字化实践50位技术专家共同创作,文字、视频、音频交互阅读

总结

以上是生活随笔为你收集整理的delimiter mysql报错_MySql中的DELIMITER错误的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。