Given the table Employee
id | Name |
---|---|
3 | Yooden Vranx |
And the file employee.txt
1
\t
Arthur Dent
2\t
Marvin
3\t
Zaphod Beeblebrox
The --ignore
option will ignore the entry on duplicate keys
$ mysqlimport --ignore mycompany employee.txt
id | Name |
---|---|
1 | Arthur Dent |
2 | Marvin |
3 | Yooden Vranx |
The --replace
option will overwrite the old entry
$ mysqlimport --replace mycompany employee.txt
id | Name |
---|---|
1 | Arthur Dent |
2 | Marvin |
3 | Zaphod Beeblebrox |