I have three different tables in MySQL:

given an user id, how can i get a list of role’s name of this user?
For example, user_id = 1
I need a list like this (1, deleteuser, modifyuser, viewuser)
How can I construct my SQL command to get such a list?
JOINthe three tables like so:However, if you want the list of roles for each user to be concatenated into one string. Use
GROUP_CONCATlike so:SQL Fiddle Demo