Mysql 单列按符号分隔为多条数据
select a.id,substring_index(substring_index(a.name,’,’,b.help_topic_id+1),’,’,-1) name
from test a join
mysql.help_topic b
on b.help_topic_id < (length(a.name) - length(replace(a.name,’,’,’’))+1)
order by a.id;
原链接
##CMD本地导入sql文件
g:
cd mysql\bin
先进入mysql安装目录下的bin目录下
mysql -u root -p 数据库名称< D:\sjk\user.sql 按回车键后输入数据库的密码