stonejar 发表于 2016-02-01 15:22

Records: 19 Deleted: 0 Skipped: 19 Warnings: 0怎么把skipped找出来

各位高手好,我用load data时提示
Records: 100 Deleted: 0 Skipped: 19 Warnings: 0
怎么把skipped类似show出来,类似show warnings一样。
感谢!!

seesea2517 发表于 2016-02-16 09:30

回复 1# stonejar


    参考:http://dev.mysql.com/doc/refman/5.5/en/load-data.html
有如下内容:
If you get "Skipped records" using "LOAD DATA LOCAL INFILE" copy the data file to the actual database server and do the load without the "LOCAL" keyword.
This will then stop when an error occurs, 9 times out of 10 it will be index issues and you will know why there are skipped records.

e.g. LOAD DATA LOCAL INFILE 'myinfile.txt';
Query OK, 288168 rows affected (1 min 44.49 sec)
Records: 494522 Deleted: 0 Skipped: 206354 Warnings: 0

LOAD DATA INFILE '/data/input/myinfile.txt';
Query OK, 252243 rows affected (0.02 sec)
ERROR 1062 (23000): Duplicate entry '5935009001-2008-08-03 04:19:18' for key 1
页: [1]
查看完整版本: Records: 19 Deleted: 0 Skipped: 19 Warnings: 0怎么把skipped找出来