Headlines
Loading...
how to import data from excel to mysql

how to import data from excel to mysql

In this post i will show you the easiest way to import data from excel to mysql.

STEP1First step is to Open Excel sheet and save it as "CSV" format. when you open csv file it will display as shown below:

STEP 2
Create a new table abc with 3 columns ie name,surname & waste

STEP 3
Type the following below command in MYSQL

mysql> load data infile 'e:\Book2.csv' into table abc fields terminated by ',' l
ines terminated by '\r\n';
Query OK, 3 rows affected (0.05 sec)
Records: 3 Deleted: 0 Skipped: 0 Warnings: 0

mysql> select * from abc;
+-------+---------+--------+
| name | surname | waste |
+-------+---------+--------+
| dummy | tom | cruise |
| dummy | zoe | kole |
| dummy | keanu | reeves |
+-------+---------+--------+
3 rows in set (0.00 sec)
*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***