Question posted 2011 · +18 upvotes
I have a lot of excel/ CSV files that I need to load into my db in MySQL Workbench (I’m on Mac OS X). I’ve searched around for a good walk-through or tutorial, but I haven’t seen anything that clearly explains how to load CSVs into MySQL Workbench….can anyone help?
Accepted answer +12 upvotes
are you trying to load csv files into a MySQL table? You can do that easily with the LOAD DATA LOCAL INFILE command.
Example:
LOAD DATA LOCAL INFILE '/data.csv' INTO TABLE my_table FIELDS TERMINATED BY ','
You should be able to enter that command from any interface to MySQL. I’m assuming workbench has a way for you to execute sql queries.
Top excel Q&A (6)
- Shortcut to Apply a Formula to an Entire Column in Excel +335 (2011)
- How should I escape commas and speech marks in CSV files so they work in Excel? +136 (2012)
- Convert xlsx to csv in linux command line +96 (2012)
- How to create a link inside a cell using EPPlus +50 (2011)
- IF statement: how to leave cell blank if condition is false ("" does not work) +44 (2013)
- T-SQL: Export to new Excel file +44 (2012)
excel solutions on this site
.