数据存储为 

mysql输出结果换行 mysql字符串换行_自增

 

 

 实现效果

mysql输出结果换行 mysql字符串换行_自增_02

 

 

 sql:

mysql输出结果换行 mysql字符串换行_Code_03

mysql输出结果换行 mysql字符串换行_自增_04

SELECT
    a.id,
    a.code,
    SUBSTRING_INDEX( SUBSTRING_INDEX( a.monitor_content, ',', b.id + 1 ), ',',- 1 ) AS ids 
FROM
    process_monitoring AS a
    JOIN process_monitor_content AS b ON b.id < ( length( a.monitor_content ) - length( REPLACE ( a.monitor_content, ',', '' ) ) + 1 )
        where a.code ='4203376628674604072';

View Code

process_monitor_content 表为自增序号表

格式ID 自增大于需要分组的字段就可以