CodePudding user response:
select rw. *
, (the select group_concat (what zj had. ZJXM) from what zj had designed table home where what zj had. ZJID in (select glA. ZJ_ID from experts task associative table glA where glA. RW_ID=rw. RWID)) experts name
, (the select group_concat (what zj had. ZJXM) from what zj had designed table home where what zj had. ZJID in (select glB. ZJID from attendees associative table glB where glB. RW_ID=rw. RWID)) attendees name
From the task table rw
Experts names, names of attendees found out to comma separated
CodePudding user response:
What database? Different database row transfer column methodCodePudding user response:
Table design is unreasonable, the middle two tables, 2 for one, it'll be a lot more good to checkCodePudding user response:
The database design, the relationship in the middle of the table with a piece of table doesn't it just add a field, after the one thousand plus a interns, add list of xxDo you want the SQL statement, hole hole in two relational table
I can't do a little test result, can only give you some ideas
In fact, is the best way to change a relational table into a, query Sql good write back or extension