MySQL Workbench reports “is not valid at this position for this server version” error

前端 未结 3 1505
不思量自难忘°
不思量自难忘° 2020-12-17 10:52

For the following SQL query:

SELECT COUNT (distinct first_name) from actor;

I receive the following error message:

\"SELECT         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 11:22

    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.

    Let's try this:

    SELECT COUNT(DISTINCT first_name) FROM actor;
    

提交回复
热议问题