EXISTS subquery causes error 1064(EXISTS 子查询导致错误 1064)
问题描述
自从我上次 PLESK 更新到 12.0.18 #70 以来,我在使用带有 EXISTS 子查询的 select 语句时遇到了 phpMyAdmin 的问题.
since my last PLESK Update to 12.0.18 #70, I have a problem with phpMyAdmin using select statements with EXISTS subqueries.
如果我仅以 MariaDB 网站上的示例为例(我使用数据库上的真实表和字段对其进行了测试):
If I take simply the example from the MariaDB website (I tested it with real tables and fields on my DB):
SELECT col1 FROM t1 WHERE EXISTS (SELECT * FROM t2)
解释器迅速在EXISTS"和(SELECT"下划线显示错误 1064
Quickly the interpreter underlines "EXISTS" and the "(SELECT" to show the error 1064
#1064 - You have an error in your SQL syntax;
1. unknown keyword (near "EXISTS" at position 30)
2. unexpected character (near "(" at position 37)
重要提示:Select 语句在我的 MariaDB (10.0.20) 服务器上使用 PHP 代码运行良好.只有 phpMyAdmin 告诉我有语法错误.
Important to know: The Select statements works fine on my MariaDB (10.0.20) server using PHP code. Only phpMyAdmin tells me that there is a syntax error.
EXISTS 被贬低了吗?
Is EXISTS depricated?
谢谢!
[phpMyAdmin 4.5.0.2 和 MariaDB]
[phpMyAdmin 4.5.0.2 and MariaDB]
推荐答案
这是 4.5.0(.x) 版本中一系列不幸的错误的一部分.目前最新版本为 4.5.2,该版本已修复此错误;我建议您升级.
That was part of an unfortunate series of bugs with the 4.5.0(.x) releases. The latest version is currently 4.5.2 and this bug has been fixed in that version; I suggest that you upgrade.
这篇关于EXISTS 子查询导致错误 1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:EXISTS 子查询导致错误 1064


基础教程推荐
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01