d e l d h a n o a wrote:
> Here is my dilemma:
>
> mysql> describe console;
> +-------------+--------------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +-------------+--------------+------+-----+---------+----------------+
> | ID | int(11) | | PRI | 0 | auto_increment |
> | title | varchar(64) | YES | | NULL | |
> | url | varchar(96) | YES | | NULL | |
> | description | varchar(220) | YES | | NULL | |
> | category | int(11) | YES | | NULL | |
> | keywords | varchar(64) | YES | | NULL | |
> +-------------+--------------+------+-----+---------+----------------+
> 6 rows in set (0.02 sec)
>
> mysql> load data infile "/usr/local/webs/gsbeta/cons.txt" into table
> console;
> ERROR 1062: Duplicate entry '1' for key 1
>
> Now how do I get rid of this duplicate key? I just want to load the table
> into mysql!
Are you sure you have also the ID field in your data file?
If not so, you may have to use the FIELDS clause of LOAD DATA INFILE.
--Jan Dvorak, MathAn Praha, CZ.
> - Del