Re: multi inserts and duplicate key handling

2004-09-03 Thread Eric Bergen
INSERT IGNORE INTO as Paul said will skip the duplicate values an continue inserting, with a mutli row insert mysql will only skip the duplicate values as the below example shows. mysql> create table t (t int not null, unique index (t)); Query OK, 0 rows affected (0.02 sec) mysql> desc t; +--

Re: multi inserts and duplicate key handling

2004-09-03 Thread Paul DuBois
At 17:03 -0700 9/3/04, Mir Islam wrote: Does anyone know mysql handles duplicate key handling during multi inserts? INSERT INTO test values(1,2),(3,4),(4,5),(1,6),(6,7); Now the above statement fails and gives duplicate key error and exits. Is there a way for it to ignore the key violation and cont

multi inserts and duplicate key handling

2004-09-03 Thread Mir Islam
Does anyone know mysql handles duplicate key handling during multi inserts? INSERT INTO test values(1,2),(3,4),(4,5),(1,6),(6,7); Now the above statement fails and gives duplicate key error and exits. Is there a way for it to ignore the key violation and continue processing the batch? -- MySQL