直到大约 5 分钟前,我什至不知道你得到了一个 VARCHAR 类型,它也是一个数组。我将如何加入这些表:
PEOPLE
ID | PERSON | GROUPS
1 | John | {ONE,TWO}
2 | Jack | {TWO}
3 | Jill | {ONE,TWO,THREE}
4 | Jim | {TWO,THREE}
GROUPS
ID | TITLE
ONE | First
TWO | Second
THREE | Third
我想结束这样的事情:
ID | PERSON | GROUP
1 | John | ONE
1 | John | TWO
2 | Jack | TWO
3 | Jill | ONE
3 | Jill | TWO
3 | Jill | THREE
4 | Jim | TWO
4 | Jim | THREE
我如何在一个查询中做到这一点?