Mysql-列转行(字段中多个值转换为多行)
1、借助一张id自增的mysql表,自增id为1开始,并使得存储的id值尽可能大于字段里存的值个数2、拼写sqlt_auto_id 表中 id最小值为1:SELECTSUBSTRING_INDEX( SUBSTRING_INDEX( a.scene, ',', b.id ), ',', - 1 ) AS sceneFROM`t_organization` AS aJOIN t_auto_id AS b ON b.id <= ( length( a.scene ) - length
原创
2020-11-16 11:37:21 ·
2197 阅读 ·
3 评论