處理重複鍵
鑑於表 Employee
ID |
名稱 |
|---|---|
3 |
Yooden Vranx |
和檔案 employee.txt
1
\tArthur Dent
2\tMarvin
3\tZaphod Beeblebrox
--ignore 選項將忽略重複鍵上的條目
$ mysqlimport --ignore mycompany employee.txt
ID |
名稱 |
|---|---|
1 |
亞瑟登特 |
2 |
馬文 |
3 |
Yooden Vranx |
--replace 選項將覆蓋舊條目
$ mysqlimport --replace mycompany employee.txt
ID |
名稱 |
|---|---|
1 |
亞瑟登特 |
2 |
馬文 |
3 |
Zaphod Beeblebrox |