1.先针对文件创建一个数据表,如action,字段id,title,url
2.从text文件内容导入数据到mysql
load data local infile “c:/data.txt” into table action(title,url);
3.把mysql里面的数据导入到text文件
select title,url into outfile “c:/data_out.txt” lines terminated by “/r/n” from action;
MySQL 去除字段中的换行和回车符 /r/n
update action set url=replace(replace(url, char(10),''), char(13),'');
已有 0 条评论