我的 SQL 查询有“connect by regexp_substr”。如何将其转换为 PostgreSQL 10 查询?
我已经在 Ubuntu 和 toad 中试过了...
select regexp_substr('1,2,4','[^,]+', 1, level) from dual
connect by regexp_substr('1,2,4', '[^,]+', 1, level) is not null;
如何将上述查询转换为 PostgreSQL 版本 10?
最佳答案
如果不需要正则表达式,
string_to_array()
通常更快。
select *
from unnest(string_to_array('1,2,4', ',')) as t(c);
关于sql - 如何将 Oracle Sql 转换为 Postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57208337/