mysql拆分逗號一列變多行


需求:

 

SELECT 
DISTINCT substring_index(substring_index(a.value, ',', b.help_topic_id + 1), ',', - 1)
FROM TABLE a
INNER JOIN mysql.help_topic b
    ON b.help_topic_id < (length(a.value) - length(replace(a.value, ',', '')) + 1)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM