There are two problems when importing data to HeidiSQL:
1. The csv file cannot be imported, and the error message: Data too long for column 'XXX' at row 1.
For example:
we created a table area_table, and the corresponding csv file import.
The import interface is as follows:
You will encounter the following error message:
The reason for the error is that the csv file is separated by commas, and the default separator in the import interface is a semicolon, so you need to change the semicolon to a comma.
Press the [Import] button to import successfully!
2. Regarding the time format, if the time format of the csv file is YYYY/M/D and you want to import it into YYYY-MM-DD, you need to modify the format of the CSV file, but you will find that after the modification , and when the file is opened again, it changes back to its original format.
For example:
the created data table is store_table, and the corresponding csv file salesdate column time format is YYYY/M/D.
Modify the time format of the salesdate column to restore the original because when the csv file is saved, the format you set will be removed, and the time format of the computer system will be the default, so you need to modify the time format of the **** computer .
1) Enter Control Panel -> Date and Time
2) Select to change the date and time
3) Click to change the date setting
4) Set the field after the date format short date to yyyy-mm-dd
5) Click OK to make the setting take effect That's it. Open the csv file again, the date format has changed. Just import the data.
A little problem to deal with, I hope it can help you!
**It is not easy to sort out the content. I think the content of the course is good when I pass by. Please help me to like and bookmark it! Thanks♪(・ω・)ノ****If you need to reprint, please indicate the source