Date: 07/25/06 (MySQL Communtiy) Keywords: mysql, database, sql hi all MYSQL> desc stats; +-------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+---------------------+------+-----+---------+----------------+ | id | bigint(20) unsigned | | PRI | NULL | auto_increment | | date | bigint(14) unsigned | YES | | NULL | | | ent1 | varchar(10) | | | | | | ent2 | varchar(10) | | | | | +-------+---------------------+------+-----+---------+----------------+ LOAD DATA INFILE "stats.txt" INTO TABLE stats (date, ent1, ent2); Query OK, 140 rows affected (0.01 sec) Records: 140 Deleted: 0 Skipped: 0 Warnings: 0 There are 140 lines in stats.txt, fields are terminated by a tab, lines are terminated by a new line. I get 140 new entries, but "id" column (auto_increment) is "0": +------+----------------+------------+------------+ | id | date | prid | did | +------+----------------+------------+------------+ So, that is the problem. I just wonder this is a very common question, but I am new in databases... Any of your help will be appreciated. Best, Leo
|