1.查看表的结构
mysql> show create table ddd\G
*************************** 1. row ***************************
Table: ddd
Create Table: CREATE TABLE `ddd` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
mysql>
2.
mysql> LOAD DATA LOCAL INFILE 'c:\pet.txt' INTO TABLE ddd
-> LINES TERMINATED BY '\r\n';