MySQL Workbench报告“此服务器版本在此位置无效".错误 [英] MySQL Workbench reports "is not valid at this position for this server version" error

查看:1120
本文介绍了MySQL Workbench报告“此服务器版本在此位置无效".错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于以下SQL查询:

SELECT COUNT (distinct first_name) from actor;

我收到以下错误消息:

"SELECT" is not valid at this position for this server version, expecting: '(', WITH

我是SQL的新手.如何解决此错误?

I am a total newbie at SQL. How do I resolve this error?

我将完全相同的行放在具有完全相同模式的另一台PC上,并且工作正常.

I put the exact same line at another PC with the exact same schema and it worked fine.

推荐答案

您是否尝试运行查询以删除"COUNT"和方括号之间的空格?我在MYSQL 5.7上运行了与您类似的查询,但它给了我一个错误,但没有足够的空间,查询就会运行.

Have you tried to run the query deleting the space between "COUNT" and the bracket? I run a similar query to yours on MYSQL 5.7 and it gives me an error, but without that space the query runs.

让我们尝试一下:

SELECT COUNT(DISTINCT first_name) FROM actor;

这篇关于MySQL Workbench报告“此服务器版本在此位置无效".错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆