返回数说广场
1
postgresql中,将字符串'1|23|456'按'|'拆分为3行ACDE
1
23
456
以下哪些选项是可行的?
A
select split_part('1|23|456','|',i+1) from generate_series(0,length('1|23|456')-length(replace('1|23|456','|',''))) as i;
B
select unnest(string_to_array('1|23|456','\|'));
C
select unnest(regexp_split_to_array('1|23|456','\|'));
D
select unnest(regexp_matches('1|23|456','\d+','g')) ;
E
select regexp_split_to_table('1|23|456','\|');
0
1 285
分享
评论
热门数说


