Skip to content

INFILE

LOAD DATA INFILE 'data.txt' INTO TABLE my_table;
Query OK, 3 rows affected (0.01 sec)
Records: 3 Deleted: 0 Skipped: 0 Warnings: 0

The LOAD DATA INFILE statement in MySQL is used to read rows from a text file into a corresponding table in the database. In the example code, the ‘data.txt’ file is used as the data source and the data is loaded into the my_table table in the database. The output signifies that the query was successfully executed and that 3 rows of data were affected (i.e., inserted into the table) without any warnings or errors.