I have three tables
users
usersrole
roles
A user can have one to many roles (reason for usersrole table)
I want to write an sql which will return a row for each user and all the roles it belongs to in a comma separated format.
i.e.
How do i do that?
users
usersrole
roles
A user can have one to many roles (reason for usersrole table)
I want to write an sql which will return a row for each user and all the roles it belongs to in a comma separated format.
i.e.
Code:
USER USERROLE
Bob Member, Admin
Dave Member
How do i do that?