您的位置:首页 > 其它

How to convert CSV into Database Table?

2012-06-28 23:49 435 查看
CSV file:

COL1;COL2;COL3
1;2.1;a
2;2.2;b
3;2.3;c


the first line will be the column names, the rest of the data will be the content.

1. recognize data type

2. get table columns

3. create "create table" sql

4. execute it

5.create "Insert" sql, use prepareStatement. Therefore, setXXX should be adjusted by data type.

6. execute them all
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: