<bdo id='wjoz4'></bdo><ul id='wjoz4'></ul>

<small id='wjoz4'></small><noframes id='wjoz4'>

<tfoot id='wjoz4'></tfoot>

    <legend id='wjoz4'><style id='wjoz4'><dir id='wjoz4'><q id='wjoz4'></q></dir></style></legend>

        <i id='wjoz4'><tr id='wjoz4'><dt id='wjoz4'><q id='wjoz4'><span id='wjoz4'><b id='wjoz4'><form id='wjoz4'><ins id='wjoz4'></ins><ul id='wjoz4'></ul><sub id='wjoz4'></sub></form><legend id='wjoz4'></legend><bdo id='wjoz4'><pre id='wjoz4'><center id='wjoz4'></center></pre></bdo></b><th id='wjoz4'></th></span></q></dt></tr></i><div id='wjoz4'><tfoot id='wjoz4'></tfoot><dl id='wjoz4'><fieldset id='wjoz4'></fieldset></dl></div>

        MySql 中的 DELIMITER 错误

        时间:2023-08-21
        <tfoot id='3dWj4'></tfoot>

          <tbody id='3dWj4'></tbody>
                <bdo id='3dWj4'></bdo><ul id='3dWj4'></ul>

                <small id='3dWj4'></small><noframes id='3dWj4'>

                • <legend id='3dWj4'><style id='3dWj4'><dir id='3dWj4'><q id='3dWj4'></q></dir></style></legend>
                  <i id='3dWj4'><tr id='3dWj4'><dt id='3dWj4'><q id='3dWj4'><span id='3dWj4'><b id='3dWj4'><form id='3dWj4'><ins id='3dWj4'></ins><ul id='3dWj4'></ul><sub id='3dWj4'></sub></form><legend id='3dWj4'></legend><bdo id='3dWj4'><pre id='3dWj4'><center id='3dWj4'></center></pre></bdo></b><th id='3dWj4'></th></span></q></dt></tr></i><div id='3dWj4'><tfoot id='3dWj4'></tfoot><dl id='3dWj4'><fieldset id='3dWj4'></fieldset></dl></div>
                  本文介绍了MySql 中的 DELIMITER 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在使用以下 sql:

                  I am using the following 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 执行它时,我面临以下错误:

                  I stored this in db_auto_increment_settings_procedure.sql and when I am trying to execute this from ant, I am facing the following error:

                  [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
                  

                  推荐答案

                  分隔符仅用于 mysql 客户端(不适用于 API、驱动程序等).
                  所以,这行不通.

                  The delimiter is used only by mysql client (not on API, driver ... etc).
                  So, it won't work.

                  查看您的错误消息:-

                  [sql] Executing resource: /mysql/install/db_auto_increment_settings_procedure.sql  
                  [sql] Failed to execute:  DELIMITER
                  

                  很确定这将在 linux 系统中工作

                  Pretty sure this will work in linux system

                  mysql -u root -pxxx -h yyy < YOUR_SQL.sql
                  

                  如果适用,您只需使用 mysql 客户端手动创建存储过程,
                  并且是一个没有汗水的解决方案.

                  If applicable, you just manually create the stored procedure using mysql client,
                  and is a no-sweat solution.

                  如果你需要动态创建这个,
                  该文档可能会提供一些见解信息
                  http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-basic.html

                  If you need to create this dynamically,
                  this doc might provide some insight information
                  http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-basic.html

                  这篇关于MySql 中的 DELIMITER 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:ant sql 插入语句在“--"字符串上失败.解决方法 下一篇:用于检查数据库(连接)是否存在的 Ant 任务?

                  相关文章

                  最新文章

                  <tfoot id='QbvBd'></tfoot>

                    1. <legend id='QbvBd'><style id='QbvBd'><dir id='QbvBd'><q id='QbvBd'></q></dir></style></legend>
                      • <bdo id='QbvBd'></bdo><ul id='QbvBd'></ul>
                    2. <i id='QbvBd'><tr id='QbvBd'><dt id='QbvBd'><q id='QbvBd'><span id='QbvBd'><b id='QbvBd'><form id='QbvBd'><ins id='QbvBd'></ins><ul id='QbvBd'></ul><sub id='QbvBd'></sub></form><legend id='QbvBd'></legend><bdo id='QbvBd'><pre id='QbvBd'><center id='QbvBd'></center></pre></bdo></b><th id='QbvBd'></th></span></q></dt></tr></i><div id='QbvBd'><tfoot id='QbvBd'></tfoot><dl id='QbvBd'><fieldset id='QbvBd'></fieldset></dl></div>

                      <small id='QbvBd'></small><noframes id='QbvBd'>