ENCLOSED BY
Example
Section titled “Example”LOAD DATA INFILE 'path/to/your/csv'INTO TABLE your_tableFIELDS TERMINATED BY ','ENCLOSED BY '"'LINES TERMINATED BY '\n';Output
Section titled “Output”Query OK, 20 rows affected (0.01 sec)Records: 20 Deleted: 0 Skipped: 0 Warnings: 0Explanation
Section titled “Explanation”The above SQL code is loading data from a CSV file into a MySQL table. The ENCLOSED BY '"' keyword is used to indicate that the values inside the file are enclosed by double quotes. It ensures that these quoted values are treated as single entities even if they contain the field terminator character (in this case, a comma).