MySQL csvファイルのインポート

777 ワード

1、databaseとtableの作成
2、
load data infile 'E:/baiduyundownload/400W-600W.csv'
into table kfinfo
fields terminated by ','
optionally enclosed by '"'
lines terminated by '\r
' ignore 1 lines (name , cardno , descriot , ctftp , ctfid , gender , birthday , address , zip , dirty , district1 , district2 , district3 , district4 , district5 , district6 , firstnm , lastnm , duty , mobile , tel , fax , email , nation , taste , education , company , ctel , caddress , czip , family , version , id );

上記のコマンドをtmpに保存する.sqlでmysqlコマンドラインで実行
source tmp.sql

できます.
質問:
インポートが完了すると、worringが現れることがあるので、後で注意しましょう.