【发布时间】:2022-06-16 17:34:16
【问题描述】:
SQL 选择列数组为字符串 我的桌子看起来像
table A:
| id | account |
| -- | ------- |
| 1 | kenvin |
| 2 | charles |
table B:
| id | title | targetgroup | targetuser |
| -- | ----------- | ----------- | ---------- |
| 1 | promotion A | 1 | [] |
| 2 | promotion B | 1 | [] |
| 3 | promotion c | 4 | [1,2] |
targetgroup为4时如何将账号加入promotion_table 预期结果(如下部分)
| id | title | targetgroup | targetuseraccount |
| -- | ----------- | ----------- | ------------------- |
| 1 | promotion A | 1 | [] |
| 2 | promotion B | 1 | [] |
| 3 | promotion c | 4 | ['kenvin','charles']|
【问题讨论】:
-
您使用的是哪个 dbms?
标签: sql