How to upload csv file into MySQL Database Example
Comma-Seperated-Value(CSV) file is a common file that used by most developers to extract data from database. Today i want to show how to upload or insert CSV file into database MySQL directly without need to read line by line in the CSV file. Let say this is the example of CSV file CSV File Content,Example 1 NO;DATE;TIME;ACCNO;STATUS 1;20131211;100856;12345;ACTIVE 2;20131211;095625;25896;NOT ACTIVE CSV File Content, Example 2 "NO";"DATE";"TIME";"ACCNO";"STATUS" "1";"20131211";"100856";"12345";"ACTIVE" "2";"20131211";"095625";"25896";"NOT ACTIVE" The above csv file are two example of csv files content. Lets start learn how to upload this file into MySQL Database. MySQL have a powerful sql statement to read this file and insert into database as batch. This statement is the fastest way to insert into database. You can read more about LOAD ...