I have a table of user group assignments, such as:
ID----UserName------Group
01 johnsmith admin
02 sarahwilles admin
03 johnsmith testuser
I would like to display it as:
UserName-------Groups
johnsmith admin, testuser
sarahwilles admin
Is this possible via SQL?
Not in standard SQL, but MySQL** provides
GROUP_CONCATwhich will do exactly what you want.** presuming that’s ok, since you’ve tagged the question with
mysql