我要定位的表中的字段是 date_sent DATE
这是 CSV 的一部分和以下导入查询。为什么将日期字段设置为 NULL?
1,"1/21/2013","0",1
2,"2/27/2013","0",1
这是 SQL
LOAD DATA LOCAL INFILE 'C:/Users/Me/CSV.csv'
INTO TABLE Collections
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
(`id`, @DATE_STR, `col`, `sid`)
SET `date_sent` = STR_TO_DATE(@DATE_STR, '%m/%d/%Y')