问题-: Mysql如何进行以,分割的字符串的拆分分割开逗号 分号的字段。其他字段自动补齐。 https://blog.csdn.net/u012009613/article/details/527705
问题-: Mysql如何进行以,分割的字符串的拆分
分割开逗号 分号的字段。其他字段自动补齐。
SELECT s.* from (
SELECT t.ID,t.time_old,
substring_index( substring_index( t.all_content, ';', b.help_topic_id + 1 ), ';', -1 ) content_split
-- t.*
FROM
excel_lvli t
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( t.all_content ) - LENGTH( REPLACE ( t.all_content, ';', '' ) ) + 1 )
and t.all_content like '%;%'
and t.all_content like '%画了许多%'
) s
WHERE LENGTH(s.content_split) >0 ;
SELECT
substring_index( substring_index( t.context, ',', b.help_topic_id + 1 ), ',', - 1 )
FROM
test.test t
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( t.context ) - LENGTH( REPLACE ( t.context, ',', '' ) ) + 1 );
实现出来的效果。 :
--结束END--
本文标题: mysql分号分割开字段。拆分
本文链接: https://www.lsjlt.com/news/40782.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0