12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-12-25 09:57:55
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
问题-: mysql如何进行以,分割的字符串的拆分分割开逗号 分号的字段。其他字段自动补齐。 https://blog.csdn.net/u012009613/article/details/52770567 SELECT s.* from (SEL
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
问题-: 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.* FROMexcel_lvli tJOIN 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 WHERELENGTH(s.content_split) >0 ;
SELECTsubstring_index( substring_index( t.context, ',', b.help_topic_id + 1 ), ',', - 1 ) FROMtest.test tJOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( t.context ) - LENGTH( REPLACE ( t.context, ',', '' ) ) + 1 );
实现出来的效果。 :
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19