mysql -uroot -ppassword
SELECT * FROM TABLE INTO OUTFILE 'c://a.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n';
将csv文件另存为ANSI格式的文件
sqlldr userid=user/password@database control=‘d:\test.ctl‘ log=’d:\test.log’
--test.ctl
load data
infile 'C:\sss\a.csv'
append into table ss
fields terminated by ','
optionally enclosed by '"'
(a,b)