Bug #61943 | Syntax to specify a field from select_expr for Group By | ||
---|---|---|---|
Submitted: | 21 Jul 2011 13:16 | Modified: | 7 Jul 2012 17:24 |
Reporter: | Sergei Kulakov (Candidate Quality Contributor) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S4 (Feature request) |
Version: | 5.5.12 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | qc |
[21 Jul 2011 13:16]
Sergei Kulakov
[22 Jul 2011 10:02]
Valeriy Kravchuk
With two possible workarounds (use numeric position of filed and use unique alias) and known for years behavior of MySQL in this case, I do not think there are many chances to see this request implemented any time soon...
[22 Jul 2011 10:17]
Sergei Kulakov
Note that the documentation says numeric positions are deprecated. Eventually they may get dropped! In that case the number of workarounds decrements to 1. also, numeric positions are not very nice. And I do not sugggest to change the behavour of MySql, I want to extend its syntax. If you use the usual syntax the behaviour does not change. I want to HAVE A CHOICE to select which field I group by.
[22 Jul 2011 10:24]
Sergei Kulakov
Also, the mere fact that you have to use workarounds to do what you want because the native syntax does not allow you to achieve that is wrong. I suggest to extend the syntax to give more flexibility and use no workarounds. This may also beapplied to ORDER BY and HAVING clauses. Why not? The default behaviour is good but why not have a choice?!