Strange behavior with a strange request
Hi there !
Today, a dev in my company asked me about a strange behavior, but he doesn't noticied that its request were completely weird ... here it is, extremly simplified :
{{{
SELECT id FROM a_table
WHERE id > 0
GROUP BY id
AND id > 3
}}}
I can't understand how MySQL parses it cause I don't see any usage of AND after GROUP BY in the documentation ^-^
Strangely enouth, id > 0 (after the GROUP BY) there is only one result, and with an integer greater than 0, like "id > 2", there is two fields returned, the first, AND the first matching id > 2.
Any idea ? Is this a bug of a feature ? :-P
Subject
Views
Written By
Posted
Strange behavior with a strange request
2234
December 08, 2011 05:03AM
1102
December 10, 2011 11:37PM
1159
December 12, 2011 09:01AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.