For a large amount of data that cannot be simply inserted using the insert statement, you need to use a specific load statement to load the data in the txt document.
1. First use navicat to create a table in the mysql database (note that it corresponds to the columns of the txt data), the database and The txt file is as shown below
##2. Find the MySQL Command Line Client and open it
##4. Enter the code to load txt data:
load data infile 'absolute file' into table table name, and then the data is imported.
#InstructionsNote that the columns of the txt file and the table must be consistent
The above is the detailed content of How to import txt data in mysql?. For more information, please follow other related articles on the PHP Chinese website!