A table
A_id a_name,,,
1 a_name1,,,
2 a_name2,,,
The second table
Table B
B_id a_id b_xx,,,
1 1 b_xx1,,,
2 1 b_xx2,,,
3 2 b_xx3,,,
The third form
C table
C_id a_id c_xx,,,
1 1 c_xx1,,,
2 1 c_xx2,,,
3 2 c_xx3,,,
Explanation: A - & gt; B a one-to-many
A - & gt; C a one-to-many
Expectation result C and B check to the following results:
C_id a_id c_xx b_xx
1 1 c_xx1 b_xx1
1 1 c_xx1 b_xx2
2 1 c_xx2 b_xx1
2 1 c_xx2 b_xx2
3 2 c_xx3 b_xx3
O great god show how many-to-many query
CodePudding user response:
Bosses for your guidanceCodePudding user response:
Has been solved, oneself make a mistake a field