View Single Post
  #25 (permalink)  
Old 08-14-2007, 05:25 AM
kumaresan kumaresan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 12
kumaresan is on a distinguished road
Send a message via AIM to kumaresan Send a message via Yahoo to kumaresan
Post Re: Use of group_concat in MySQL

Hi,

In group_concat() function

SELECT GROUP_CONCAT(name) FROM employee LIMIT 2 -- returns all name

while using group_conact() function with limit clause retruns unexpected result .

so change the query like

SELECT GROUP_CONCAT(A.NAME) FROM (SELECT * FROM E_EMPLOYEE LIMIT 2) A -- returns only two name.


Thanks,
V.Kumaresan.

Last edited by kumaresan : 09-24-2007 at 11:58 PM.
Reply With Quote