Home > Database > Mysql Tutorial > 把字符串按照分割符分解成不同的部分

把字符串按照分割符分解成不同的部分

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:58:12
Original
1086 people have browsed it

select regexp_substr('A,B,C,D,E', '[^,]', 1, level, 'i') as str from dual connect by level = length('A,B,C,D,E') - length(regexp_replace('A,B,C,D,E', ',', '')) 1;

select regexp_substr('A,B,C,D,E', '[^,]+', 1, level, 'i') as str
from dual
connect by level length('A,B,C,D,E') - length(regexp_replace('A,B,C,D,E', ',', '')) + 1;
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template