Re: Exception: DELIMITER //
Hi,
MySQL client DELIMITER command is not part of SQL language. This is just a directive which tells MySQL client how to detect end of statements. But when using connector this is not needed, because SQL queries are given as strings and it is clear where they end. Thus, when using connector API, you can simply use ';' inside stored procedure body and there is no confusion. For example this works as expected:
~~~~~~
s.sql(R"(
CREATE PROCEDURE test.dorepeat(p1 INT)
BEGIN
SET @x = 0;
REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
END
)").execute();
~~~~~~
Subject
Views
Written By
Posted
817
February 10, 2019 05:25AM
Re: Exception: DELIMITER //
475
March 07, 2019 09:23AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.