- 需求
- 实现
原字符串是以逗号分隔保存在mysql中,现需要将该字符拆分出来做查询条件。
SELECt substring_index(substring_index(被拆分的字段,',', b.help_topic_id + 1), ',', -1) FROM 表名 t join mysql.help_topic b ON b.help_topic_id < (LENGTH(被拆分的字段) - LENGTH(REPLACE(被拆分的字段, ',', '')) + 1) where finance_apply_no = '1111111111111' and event_no = '******'



