Mysql 在多行查询中打破长查询
Mysql break long query in multiple line queries
我使用MySQLdocker容器来开发应用程序。
我的应用程序成功连接到 MYSQL 并正确执行查询。
当我想对其执行多行查询时,我的问题就来了。
例如:
-- liquibase format sql
--changeset alipour:13990724_1
select host,
user,
Select_priv
from user
where 1=1;
执行查询后出现以下错误:
ERROR 1064 (42000) at line 2: 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 '--changeset alipour:13990724_1
select host,
user,
Select_priv
from' at line 1
我检查的方法但得到相同的错误:
- 在数据源 URL
上使用 allowMultiQueries=true
- 将查询保存在一个文件中,我通过 MySQL 命令
对其进行了测试
我在我的应用程序中使用 spring boot 和 liquibase 进行数据库演化。
一个
引起了问题。
感谢@GMB 的提示。
我变了
--changeset alipour:13990724_1
至
-- changeset alipour:13990724_1
问题解决了。
我使用MySQLdocker容器来开发应用程序。 我的应用程序成功连接到 MYSQL 并正确执行查询。
当我想对其执行多行查询时,我的问题就来了。
例如:
-- liquibase format sql
--changeset alipour:13990724_1
select host,
user,
Select_priv
from user
where 1=1;
执行查询后出现以下错误:
ERROR 1064 (42000) at line 2: 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 '--changeset alipour:13990724_1
select host,
user,
Select_priv
from' at line 1
我检查的方法但得到相同的错误:
- 在数据源 URL 上使用
- 将查询保存在一个文件中,我通过 MySQL 命令 对其进行了测试
allowMultiQueries=true
我在我的应用程序中使用 spring boot 和 liquibase 进行数据库演化。
一个
引起了问题。
感谢@GMB 的提示。
我变了
--changeset alipour:13990724_1
至
-- changeset alipour:13990724_1
问题解决了。