【问题标题】:Mariadb: ER_PARSE_ERROR, how to fix it? [duplicate]Mariadb:ER_PARSE_ERROR,如何解决? [复制]
【发布时间】:2018-12-24 13:50:45
【问题描述】:

我为 mariadb 10.1 做了 sql 查询

但是,我将mariadb 10.1升级到10.3,却出现ER_PARSE_ERROR和SQL语法错误。

这个错误是:

code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage:
 'You have an error in your SQL syntax; check the manual that 
  corresponds to your MariaDB server version for the right syntax to 
  use near \')\' at line 1',
sqlState: '42000',
index: 0,
sql: 'select * from user where identifier in ()' }

怎么了?

我一直在寻找,但我不知道出了什么问题。

【问题讨论】:

  • 您的代码中有此错误吗?还是在升级处理中?

标签: mysql sql mariadb


【解决方案1】:

它似乎不喜欢空列表。尝试更改查询。

select * from user where identifier in (null)

Null 不会匹配任何值(甚至是另一个 null),所以这实际上是您想要的。

【讨论】:

    猜你喜欢
    • 2017-04-03
    • 2020-02-07
    • 2021-08-21
    • 2021-12-28
    • 2021-09-24
    • 2012-05-14
    • 2014-09-20
    • 2017-02-21
    • 2018-07-09
    相关资源
    最近更新 更多