pgsql两字段互换
时间: 2023-08-21 17:07:11 浏览: 203
pgsql数据库jdbc驱动jar包
引用提供了一种使用正则表达式的方法来实现字符串中两个字段的互换。具体代码如下:
```
SELECT regexp_substr('abc1,cbd2,db3,db5', '[^, ', 1, rownum) AS 字符串
FROM dual
CONNECT BY rownum <= length('abc1,cbd2,db3,db5') - length(replace('abc1,cbd2,db3,db5', ',', ''));
``<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [plsql 字符串转成数组(互换)](https://blog.csdn.net/qq_34745941/article/details/106348979)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文