[英]JSON extract multiple columns PostgreSQL
I had a question earlier: PostgreSQL trim text field with regex (or else) And I got a wonderful answer by a_horse_with_no_name.我之前有一个问题: PostgreSQL 用正则表达式修剪文本字段(或其他)我得到了 a_horse_with_no_name 的精彩回答。 Now I have an additional question regarding this issue.现在我有一个关于这个问题的额外问题。
So here it is this rextester https://rextester.com/SUWG96428 and the goal is to have all the ids in a separate column.所以这里是这个rextester https://rextester.com/SUWG96428 ,目标是将所有ID放在一个单独的列中。 Is it possible at all?有可能吗?
Like this:像这样:
+---+----+-------+-------+
| | id | ids_1 | ids_2 |
+---+----+-------+-------+
| 1 | 1 | 4202 | 4203 |
| 2 | 2 | 4204 | |
| 3 | 3 | 4201 | |
+---+----+-------+-------+
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.