I have these 3 tables
Table books (i want to fill categories column with 1 string of categories delimited with a comma)
id categories
1 null
2 null
3 null
... ...
Table categories
id name
1 adventure
2 horror
... ...
Table BooksCategories (a book can have multiple categories)
bookid categoryid
1 1
1 3
2 2
3 1
3 2
... ...
I have a query that gives me something like this
bookid categories
1 horror, adventure
2 action,...,...
Now, I want to update the column categories of my books table to the corresponding value of my query. Is it possible to do that in an update?
Thanks, I hope it is clear enough