Mysql中字段分割字符串(⼀⾏转多⾏)t_customers 表中的⼀条记录:需要的结果:sql实现 SELECT a.id,a.username,SUBSTRING_INDEX( SUBSTRING_INDEX( a.operid, ';', b.help_topic_id +1 ), ';',-1 ) AS ids FROM `t_customers` AS a JOIN mysql.help_topic AS b ON b.help_topic_id <...
1、left(字段名,index) 从左边开始第index开始截取 2、right(字段名,index)从右边开始第index开始截取 3、substring(字段名,index)当index>0从左边开始截取直到结束 当index<0从右边开始截取直到结束 当index=0返回空 4、substring(字段名,index,len)从index开始,截取len长度 5、substring_index(字段名,str,count...