Formatting input from excel to mysql using command line client -
i want import data excel mysql database using command line client. example of how csv-file built:
name 1 | 1 | 2 | 3 | name 2 | 1 | 2 | 3 | name 3 | 1 | 2 | 3 |
i'm using code:
load data local infile 'path file.csv' table table_name fields terminated ',' lines terminated '\n';
i "query ok" , code formatting on table should csv-file result:
| null | null | null | | null | null | null | | null | null | null |
what wrong?
seems u have used '|' in csv file delimiters instead of comma, try code
`load data local infile 'path file.csv' table table_name fields terminated '|'lines terminated '\n';`
Comments
Post a Comment