I somehow need this feature,but MySQL doesn't support it at this moment.
I'm using GROUP_CONCAT(CONCAT(...))
to generate a xml-like stuff.
But when the size exceeds the limit,the xml is just broken!
So I have to somehow make it only retrieve 5 rows !
I've worked around this using SUBSTRING_INDEX
.
For example:
SELECT SUBSTRING_INDEX(GROUP_CONCAT(Field1 SEPARATOR ','), ',', [# of elements to return])
FROM Table1;