3
如何將數據從csv文件導出到mysql數據庫? 是否有任何查詢或其他方式?如何將數據從csv文件導出到mysql數據庫?
如何將數據從csv文件導出到mysql數據庫? 是否有任何查詢或其他方式?如何將數據從csv文件導出到mysql數據庫?
我想你的意思IMPORT
,這裏的如何:
load data local infile 'yourCSVfilepath.csv' into table tableNameHERE
fields terminated by ','
optionally enclosed by '"'
lines terminated by '\r\n'
從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
http://stackoverflow.com/questions/7442285/please-help-me-to-load-csv-to-mysql – 2013-03-14 06:40:08