我正在尝试将 .txt 文件中的数据加载到 mysql 中。该表如下所示:
+-------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------+----------------+
| user_name | varchar(10) | NO | MUL | NULL | |
| user_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| listings | int(10) unsigned | NO | | 0 | |
| connections | int(10) unsigned | NO | | 0 | |
| flags | int(10) unsigned | NO | | 0 | |
| days | int(10) unsigned | NO | | 0 | |
| email | varchar(30) | NO | | NULL | |
| suspend | tinyint(1) | YES | | 0 | |
+-------------+------------------+------+-----+---------+----------------+
LOAD DATA LOCAL INFILE
当我使用如何处理列加载数据时user_id
?所有其他项目已经有数据。我希望数据库分配 user_id。那可能吗?
user_id
文本文件中的列应该是什么样的?