Home > other >  How to use sub queries in MYSQL results show as one column
How to use sub queries in MYSQL results show as one column

Time:04-08

Table A:
ID NAME

Table B:
ID NAME PID

I want to get the query result is

ID=& gt; 1
NAME=& gt; Zhang SAN
SUB=& gt; [{
ID: 1,
NAME: play,
PID: 1
}, {
ID: 2,
NAME: swimming,
PID: 1
}]
  • Related