1.01,Agricultural Business and Management
1.0101,"Agricultural Business and Management, General"
1.99,"Agriculture, Agriculture Operations, and Related Sciences, Other"
1.9999,"Agriculture, Agriculture Operations, and Related Sciences, Other"
3.01,Natural Resources Conservation and Research这是我的csv file.some字段的格式,有些字段在引号内,有些则不在。如果逗号(,)是字段的一部分,则字段在引号内,否则不在引号内。
我用过
load data local infile '/home/zerocool/UnivHub/database/courses.csv'
into table sub_major columns terminated by ',' optionally enclosed by '"'
escaped by '"' lines terminated by '/n';很明显,逻辑不匹配,没有行是affected.How的,我要导入这种csv文件吗?有没有什么公式或条件可以用来导入csv文件。
create table sub_major(code float(6,4) not null unique,
subject varchar(100),
primary key(code));我使用这个sql查询来创建我的表
发布于 2016-08-31 02:09:51
如果像往常一样将csv导入到数据库表中,然后尝试通过删除“character”来更新相应的列,如何?
https://stackoverflow.com/questions/39234021
复制相似问题