2013-03-14 511 views

回答

2

我想你的意思IMPORT,這裏的如何:

load data local infile 'yourCSVfilepath.csv' into table tableNameHERE 
fields terminated by ',' 
optionally enclosed by '"' 
lines terminated by '\r\n' 
1

從MySQL的數據導出到CSV使用此

SELECT * 
INTO OUTFILE '/tmp/tablename.csv' 
FIELDS TERMINATED BY ',' 
ENCLOSED BY '"' 
ESCAPED BY '\\' 
LINES TERMINATED BY '\n' 
FROM tablename 

要導入CSV到MySQL使用

LOAD DATA INFILE 'c:/tablename.csv' INTO TABLE tablename 
相關問題