Importing MS-excel to Mysql database

Asked By 10 points N/A Posted on -
qa-featured

I have more than 100k information in my spreadsheet and need to be put on my database.

Can anyone know how to Import MS-excel (.csv format) to my database (MySQL)?

SHARE
Best Answer by Sollis Parallag
Answered By 80 points N/A #125330

Importing MS-excel to Mysql database

qa-featured

Importing data from Microsoft Excel to SQL Server is done when the user decided to transfer his files from Excel worksheet to the Microsoft SQL Server Data.

To do the process, the user must have the following recommended software, hardware, service packs, and network infrastructures. The lists below are the requirements:

  1. Available instance of SQL Server 7.0, 2000, or 2005.
  2. Visual Basic 6.0 for ADO samples

It is also important that the user who is going to do the process should be familiar with:

  1. ADO development in Visual Basic
  2. Linked Servers and Distributed Queries
  3. Data Transformation Services

For further assistance regarding this process, you may visit support.microsoft.com/kb/321686.

Best Answer
Best Answer
Answered By 45 points N/A #125328

Importing MS-excel to Mysql database

qa-featured

Hello Arquelo.

Welcome to techyv.com!

Please run the sample SQL script below to import your CSV file to your MySQL table.

The example below assumes the following:

1.  Your csv file is named "mytable.csv" with 3 columns of data.

2.  The table you want to import the csv to is "tblMyTable".

3.  The table "tblMyTable" has 3 columns named "Column1", "Column2" and "Column3".

Just replace everything with the actual file name, table names, column names and other information for your particular need.

Start of code snippet

load data local infile 'mytable.csv' into table tblMyTable
fields terminated by ','
(Column1, Column2, Column3)

end of code snippet

Hope this helps you out!

Related Questions