sql-maven-plugin with multiple delimiters

南楼画角 提交于 2019-12-05 12:12:04

You can set your delimeterType to "row" in configuration block.

<configuration>
...
   <delimiterType>row</delimiterType>
...
</configuration>

delimiterType

Normal means that any occurrence of the delimiter terminate the SQL command whereas with row, only a line containing just the delimiter is recognized as the end of the command.

See more at http://mojo.codehaus.org/sql-maven-plugin/execute-mojo.html#delimiterType


For examlpe: create-proc.sql

CREATE PROCEDURE ADD_BOOK (IN title VARCHAR(100))
BEGIN
   -- your sql code 
   INSERT INTO Book (title) VALUES (title);
END
; -- this means the end of the sql command
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!