Import Data from Txt or CSV files into MYSQL database tables
来源:互联网 发布:win10系统优化方法 编辑:程序博客网 时间:2024/05/16 11:40
Mysql-connector-java-3.1.10 is a
The example below imports data from .txt file into table.
temp.txt file is a tab separated file:
"1 string" 100
"2 string" 102
"3 string" 104
"4 string" 106
testtable structure
CREATE TABLE testtable
(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
text varchar(45) NOT NULL,
price integer not null);
import java.sql.Connection; |
If you want to import a CSV file, you can use the following query:
query = "LOAD DATA INFILE '"+filename+"' INTO TABLE testtable FIELDS
TERMINATED BY ',' (text,price)";
- Import Data from Txt or CSV files into MYSQL database tables
- Import Data from csv file to Azure SQL DATABASE
- import CSV data into MySQL via PyMySQL in Python 3.3
- SQLite Tutorial 5 : How to Import CSV or Excel file into SQLite database
- Read & Return Data From Files Into PHP
- Import CSV file directly into MySQL
- Using Application Engine to Import Data from Files
- export data from mySQL to csv
- WinCE Application: using database SQLLite and import data from EXCEL
- sqoop import data from database to hbase遇到的若干问题
- Save MySQL query results into a text or CSV file
- Save MySQL query results into a text or CSV file
- lessons learned from the Qlikview loads the data from DB into qvd files
- java.io.FileNotFoundException: /data/data/com.huacai.test/files/android.txt (No such file or directo
- R转换.csv文件格式到.txt或.xlsx) [read.csv and export data to .txt or .xlsx]
- Tutorial: Import Data Into Neo4j
- Magento-import product from CSV
- Importing Large CSV Files into Excel 2003
- 常用控件
- ymcms3.1.0漏洞分析
- request路径请求函数
- AgentX 文档资料
- MySQL也真是让人郁闷(关于子查询中使用limit)
- Import Data from Txt or CSV files into MYSQL database tables
- 创建一个CDialog对话框与对话框销毁
- 追MM与Java的23种设计模式
- B/S,C/S架构混合使用(from:http://www.kuqin.com/system-analysis/20080506/8024.html)
- 介绍自己如何独立调程序
- IT人
- 开始在CSDN写博客
- c#中高效的excel导入sqlserver的方法
- C#网页自动登录和提交POST信息的多种方法 [转载]