`
iwindyforest
  • 浏览: 230723 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
收藏列表
标题 标签 来源
imprt csv file to a table in h2 database h2, h2 database, csvread, column not found
create table country 
as 
( select * from csvread('Z:/DOWNLOAD/csv/countries.csv', 'country_id;country_code;country_name', 'charset=UTF-8 fieldSeparator=; caseSensitiveColumnNames=false')) ;

--after import csv file to a table, if you got column not found while query
--becasue the table column generated is case sensitive, you need to add "" to columns like "contry_id" 
--the generated columns are all varchar type, you can only change it mannually.

alter table country alter column "country_id"  rename to country_id
alter table country alter column country_id bigint
Global site tag (gtag.js) - Google Analytics