Bug #4234 Error 1064 on "select [group function]"
Submitted: 21 Jun 2004 16:00 Modified: 21 Jun 2004 19:03
Reporter: Pierre Potvin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.0.18-nt OS:Windows (XP, SP1)
Assigned to: Dean Ellis CPU Architecture:Any

[21 Jun 2004 16:00] Pierre Potvin
Description:
Error 1064 on simple group query

How to repeat:
(Clean install of server)

create database somedb;
use somedb;
create table sometable (somecolumn varchar (100));
insert into sometable values ('something');
select count (*) from sometable;

Returns:
ERROR 1064: 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 '(*) from sometable' at line 1
[21 Jun 2004 19:03] Dean Ellis
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

Remove the space between the function name and the parenthesis: COUNT(*).