Skip navigation links

MySQL Forums :: Constraints :: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2


Advanced Search

ERROR 1062 (23000): Duplicate entry '113715-303' for key 2
Posted by: Fan Lee ()
Date: August 22, 2007 08:30AM

We were keeping getting "ERROR 1062 (23000): Duplicate entry '113715-303' for key 2" when inserting a row like below:

INSERT INTO pattern_piece_type (pce_type_id, pat_series_id, exists_ind, pat_pce_type_id, note_id, setup_by_id, setup_dt, updated_by_id, updated_dt) VALUES (303,113715,'N',27791780,null,381,'2007-08-16 11:12:07.0',null,null);

We're using MySQL 5.0.45 community edition runing on Linux RedHat 4.0. Key 2 is a compound unique key on that table. However it's very bizarre given the fact that we know for sure this is NOT a row existing with 303,113715 in that table. How come mysql doesn’t take it? Here is the definition of the table. Any help or comment would be greatly appreciated.

CREATE TABLE `pattern_piece_type` (
`pce_type_id` int(5) default NULL,
`pat_series_id` int(9) default NULL,
`exists_ind` char(1) character set latin1 collate latin1_bin default NULL,
`pat_pce_type_id` bigint(10) NOT NULL,
`note_id` int(9) default NULL,
`setup_by_id` int(5) default NULL,
`setup_dt` datetime default NULL,
`updated_by_id` int(5) default NULL,
`updated_dt` datetime default NULL,
PRIMARY KEY (`pat_pce_type_id`),
UNIQUE KEY `iu_patt_pce_type_seriestype_id` USING BTREE (`pat_series_id`,`pce_type_id`),
KEY `i_pattern_piece_type_srsid` USING BTREE (`pat_series_id`),
KEY `i_pattern_piece_type_typid` USING BTREE (`pce_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |

Options: ReplyQuote


Subject Views Written By Posted
ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 74441 Fan Lee 08/22/2007 08:30AM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 28007 Vladimir Nikolic 11/30/2007 10:24AM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 30810 Alvin Yue 01/30/2008 12:57PM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 19869 E Corr 11/13/2008 01:21AM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 15271 conquest drfence 12/22/2008 10:35PM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 15196 Rich Molumby 01/31/2009 11:48AM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 16776 Olaf Tomczak 03/15/2009 04:37PM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 11871 John Costantino 03/20/2009 07:05AM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 12246 mukesh hirve 06/25/2009 12:39AM
Re: ERROR 1062 (23000): Duplicate entry '113715-303' for key 2 10788 Dallas Bratcher 04/29/2009 06:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.