First Table
|product_name | category_ids |
|---------------------------------|
|- apple | 1, 2 |
|- extra_apple | 1, 3 |
Second Table
|category_id | category_name |
|---------------------------------|
|- 1 | fruit |
|- 2 | cheap |
|- 3 | expensive |
How can I join this, so I get something like this
| product_name | category_names |
--------------------------------------------
| apple | fruit, cheap |
| extra_apple | fruit, expensive |