导入数据库:
mysql>use databasename;
mysql>load data infile "E:\\test\\test.txt" into table tablename fields terminated by '|' lines terminated by '\r\n';
如果没有换行则:
mysql>load data infile "E:\\test\\test.txt" into table tablename fields terminated by '|';
导出数据库:
mysql>use databasename;
mysql> select * into outfile
"E:\\test\\test.txt"
fields terminated by '|'lines terminated by '\r\n' from
tablename;
如果不要换行则:
mysql> select * into outfile
"E:\\test\\test.txt"
fields terminated by ','
from
tablename;