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 파일 형식입니다. 일부 필드는 따옴표 안에 있고 일부는 그렇지 않습니다. 쉼표 (,)가 필드의 일부인 경우 필드는 따옴표 안쪽에 있습니다. 조건이 부과 된 CSV 파일 가져 오기
나는 논리가 here.so 행이 난 CSV 파일의 종류를 가져 affected.How 할 수 없습니다 일치하지 않는 분명히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';
을 사용했다. csv 파일을 가져올 수있는 수식이나 조건이 있습니까?
create table sub_major(code float(6,4) not null unique,
subject varchar(100),
primary key(code));
내가 내 테이블
'VARCHAR를 만들려면이 SQL 쿼리를 사용 ((100))'VARCHAR (255)'가 아닌'FLOAT'을 피하려고하면, 그 값은 부정확 할 수 있습니다.이 경우에'DECIMAL (6,4)'가 필요합니다. – tadman
괜찮습니다. 내 테이블, 이제이 CSV 파일을 어떻게 가져올 수 있는지 알려주시겠습니까 –