我在mysql中有一个查询,结果如下:
val1_col1A val1_col2A val1_col1B val1_col2B
val1_col1A val1_col2A val2_col1B val2_col2B
val1_col1A val1_col2A val3_col1B val3_col2B
像这样 :
1 reza math 20
1 reza c++ 19
1 reza C# 17
我的查询是:
SELECT col1A,col2A,col1B,col2B
FROM A join B
ON col3A=col3B
我想查询它的结果如下:
val1_col1A val1_col2A val1_col1B,val2_col1B,val3_col1B val1_col2B,val2_col2B,val3_col2B
像这样 :
1 reza math,c++,c# 20,19,17