实现Split函数

==作者:YB-Chi==

1
2
3
4
5
6
SELECT substring_index(substring_index(a.event_samples, '&TAB&', b.help_topic_id + 1), '&TAB&', - 1) AS event_sample
FROM parser_rule a
INNER JOIN
mysql.help_topic b
ON b.help_topic_id < ((length(a.event_samples) - length(REPLACE(a.event_samples, '&TAB&', '')))/5 + 1)
group by event_sample

PS: /5是因为分隔符为5位

文章作者: CYBSKY
文章链接: https://cybsky.top/2022/12/02/cyb-mds/database/sql/mysql/实现Split函数/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 CYBSKY