Bug #28452 | select count with alias fails | ||
---|---|---|---|
Submitted: | 15 May 2007 19:20 | Modified: | 15 May 2007 19:56 |
Reporter: | John Ruggentaler | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.0.27-community-nt | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[15 May 2007 19:20]
John Ruggentaler
[15 May 2007 19:56]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Please read at http://dev.mysql.com/doc/refman/5.0/en/select.html in which parts of the SELECT atatement aliases can be used.
[7 Dec 2010 21:21]
Carlos Gomes
Count does not accept a COUNT. I have tried all the following: select count(`pump`.*) from mytable as pump where `pump`.`type`='1'; select count(pump.*) from mytable as pump where `pump`.`type`='1'; select count(`pump`.*) from mytable as pump where pump.`type`='1'; How do I make this work?
[7 Dec 2010 21:40]
MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=58802 marked as duplicate of this one.
[8 Dec 2010 0:07]
Carlos Gomes
Your response is useless. Here is something that my help: select count(alias.*) does not not work, but select count(alias.field) does. good: select count(pump.id) from table mytable as pump good. bad: select count(pump.*) does not work at all.