【发布时间】:2015-04-27 23:39:15
【问题描述】:
当我从本地 infile 加载数据时,数据在某些行的开头被截断,我尝试了以“/r/n”、“/r”和“/n”结尾的行,它们只加载了一行在表中..
MyTable 为一列,而 MyFile.txt 在每行末尾只有一列由换行符分隔..
欢迎提出任何建议!
## Here is an example of the data I have to load
ENSG00000000003.10
ENSG00000000005.5
ENSG00000000419.8
ENSG00000000457.8
ENSG00000000460.12
ENSG00000000938.8
ENSG00000000971.11
ENSG00000001036.8
mysql> LOAD DATA LOCAL INFILE "C:/MyFile.txt" INTO TABLE MyTable;
Query OK, 57281 rows affected (0.73 sec)
Records: 57281 Deleted: 0 Skipped: 0 Warnings: 0
mysql> SELECT * FROM MyTable limit 5;
+---------------------+
| Ensembl |
+---------------------+
|ENSG00000000003.10
|NSG00000000005.5
|NSG00000000419.8
|NSG00000000457.8
|ENSG00000000460.12
+---------------------+
【问题讨论】: