LOAD DATA Statement •If  FIELDS ESCAPED BY  is empty,  NULL  is written as the word  NULL . •With fixed-row format (which is used when  FIELDS TERMINATED BY  and  FIELDS ENCLOSED BY  are both empty),  NULL  is written as an empty string. This causes both  NULL  values and empty strings in the table to be indistinguishable when written to the file because both are written as empty strings. If you need to be able to tell the two apart when reading the file back in, you should not use fixed-row format. •Fixed-size rows ( FIELDS TERMINATED BY  and  FIELDS ENCLOSED BY  both empty) and  BLOB  or TEXT  columns. •If you specify one separator that is the same as or a prefix of another,  LOAD DATA  cannot interpret the input properly. For example, the following  FIELDS  clause would cause problems: •If  FIELDS ESCAPED BY  is empty, a field value that contains an occurrence of  FIELDS ENCLOSED BY  or  LINES TERMINATED BY  followed by the  FIELDS TERMINATED BY  value causes  LOAD DATA to stop reading a field or line too early. This happens because  LOAD DATA  cannot properly determine where the field or line value ends. An attempt to load  NULL  into a  NOT NULL  column produces either a warning or an error according to the rules described in Column Value Assignment. Some cases are not supported by  LOAD DATA : FIELDS TERMINATED BY ’"’ ENCLOSED BY ’"’ The following example loads all columns of the  persondata  table: LOAD DATA INFILE ’persondata.txt’ INTO TABLE persondata; By default, when no column list is provided at the end of the  LOAD DATA  statement, input lines are expected to contain a field for each table column. If you want to load only some of a table’s columns, specify a column list: LOAD DATA INFILE ’persondata.txt’ INTO TABLE persondata ( col_name_or_user_var  [,  col_name_or_user_var ] ...); You must also specify a column list if the order of the fields in the input file differs from the order of the columns in the table. Otherwise, MySQL cannot tell how to match input fields with table columns. Each instance of  col_name_or_user_var  in  LOAD DATA  syntax is either a column name or a user variable. With user variables, the  SET  clause enables you to perform preprocessing transformations on their values before assigning the result to columns. User variables in the  SET  clause can be used in several ways. The following example uses the first input column directly for the value of  t1.column1 , and assigns the second input column to a user variable that is subjected to a division operation before being used for the value of  t1.column2 : The  SET  clause can be used to supply values not derived from the input file. The following statement sets column3  to the current date and time: LOAD DATA INFILE ’file.txt’ Column List Specification Input Preprocessing LOAD DATA INFILE ’file.txt’ INTO TABLE t1 (column1, @var1) SET column2 = @var1/100; 2647