java读取csv文件存入mysql/sqlite数据库
导入csvjdbc-1.0-36.jar包,点击跳转
【csvjdbc-1.0-36.jar:https://sourceforge.net/projects/csvjdbc/files/latest/download】
注:该网站下载比较缓慢
csv文件可以直接利用java IO进行读取;但java还提供了jdbc接口,返回结果集,可直接以数据库语言进行读取,具体代码如下:
//load this Driver
Class.forName("org.relique.jdbc.csv.CsvDriver");
/*
*create connection with the folder path(not the csv file)
*For example: data/student.csv ; folderPa