sqllite中实现字符串分割

WITH split(word, str) AS (
    -- alternatively put your query here
    -- SELECT '', category||',' FROM categories
    SELECT '', 'Auto,A,1234444,dsfdd,sd,sd'||','
    UNION ALL SELECT
    substr(str, 0, instr(str, ',')),
    substr(str, instr(str, ',')+1)
    FROM split WHERE str!=''
) SELECT word FROM split WHERE word!='';

上一篇:Go语言操作sqllite


下一篇:「赛后总结」AtCoder Beginner Contest 177