Fields Using ENCLOSED BY Without TERMINATED BY

The following steps take place when a field uses an ENCLOSED BY clause without also using a TERMINATED BY clause.

  1. Any whitespace at the beginning of the field is skipped.

  2. The first non-whitespace character found must be the start of a string that matches the first ENCLOSED BY delimiter. If it is not, then the row is rejected.

  3. If the first ENCLOSED BY delimiter is found, then the search for the second ENCLOSED BY delimiter begins.

  4. If two of the second ENCLOSED BY delimiters are found adjacent to each other, then they are interpreted as a single occurrence of the delimiter and included as part of the data for the field. The search then continues for another instance of the second ENCLOSED BY delimiter.

  5. If the end of the record is found before the second ENCLOSED BY delimiter is found, then the row is rejected.