1,文件导入:LOAD DATA INFILE ‘/tmp/pet.txt‘ INTO TABLE pet FIELDS TERMINATED BY ‘,‘ LINES TERMINATED BY ‘\n‘;
2,文件导出:select * INTO OUTFILE ‘/tmp/ptest2.txt‘ FIELDS TERMINATED BY ‘,‘ LINES TERMINATED BY ‘\n‘ FROM pet;
时间: 2024-10-24 12:20:27
1,文件导入:LOAD DATA INFILE ‘/tmp/pet.txt‘ INTO TABLE pet FIELDS TERMINATED BY ‘,‘ LINES TERMINATED BY ‘\n‘;
2,文件导出:select * INTO OUTFILE ‘/tmp/ptest2.txt‘ FIELDS TERMINATED BY ‘,‘ LINES TERMINATED BY ‘\n‘ FROM pet;