I am using LOAD DATA INFILE to import a csv data file to MySQL. I would like to leave some fields blank in the csv file in order to save users' typying, and let MySQL to set the default values to those fields when loading the data. Now, every thing is OK except the default values do not set after loading the data. Those fields remain blank.
According to MySQL's manual, it should work. I have tried every thing I could think following the manual, but still can not find the problem. I am hoping some one here could help me. The following is sql query string I used:
Code: Select all
LOAD DATA LOCAL INFILE '' file '' REPLACE INTO TABLE table
FIELDS TERMINATED BY ''terminator'' ENCLOSED BY ''"''Your help is highly appreciated.
Thanks in advance.
Ruth