1.将sql语句导入到数据库中 source f:/a.sql
2.将数据库文件导出成txt(csv格式)
select * into outfile 'f:/outfile.txt'
fields terminated by ',' enclosed by '^' escaped by '^'
lines terminated by '\r\n'
from TableName
3.将txt导入数据库
load data infile 'f:/outfile.txt' into table TableName
fields terminated by ',' enclosed by '^' escaped by '^'
lines terminated by '\r\n'
参考地址:
阅读(1004) | 评论(0) | 转发(0) |