mysqlimport example csv table

Example: mysqlimport csv

C:\mysql\bin>mysqlimport --ignore-lines=1 --fields-terminated-by=, --verbose --local -u root query C:/mysql/bin/mysql-files/address.csv

Connecting to localhost

Selecting database query

Loading data from LOCAL file: C:/mysql/bin/mysql-files/address.csv into address

query.address: Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
Disconnecting from localhost

mysql> Select * from Address;
+---------+----------+-------------+
| Name    | LastName | Address     |
+---------+----------+-------------+
| Mohan   | Sharma   | Sundernagar |
| Saurabh | Arora    | Chandigarh  |
| Rajesh  | Singh    | Lucknow     |
+---------+----------+-------------+
3 rows in set (0.00 sec)

Tags:

Sql Example