美文网首页
mysql 字符分割成列

mysql 字符分割成列

作者: 王宣成 | 来源:发表于2023-02-13 11:41 被阅读0次

字段:applicant
值:张三;李四;王五

SELECT substring_index( substring_index( a.applicant, ';', b.help_topic_id + 1 ), ';',- 1 ) as applicant from tcaplus_autoinstall.app_info_bas as `a` JOIN mysql.help_topic b ON b.help_topic_id < ( length( a.applicant ) - length( REPLACE ( a.applicant, ';', '' ) ) + 1 ) where `app_id` = 47

相关文章

网友评论

      本文标题:mysql 字符分割成列

      本文链接:https://www.haomeiwen.com/subject/kwijkdtx.html