Reply to BULK INSERT ignores UNIQUE index with IGNORE_DUP_KEY set?

Your name:

Reply:


Posted by Weyus on 06/22/07 22:33

All,

Just want to make sure that I understand what's going on here.

I have a table with IGNORE_DUP_KEY set on a unique, multi-column
index.

What I'm seeing is this:

1) When performing a BULK INSERT, the UNIQUE index is not being
respected and rows which violate the unique index are inserted.

2) When performing a regular INSERT, the UNIQUE index is being
respected and rows which violate the unique index ARE NOT inserted.

Is this expected behavior.

Also, I have some questions, given the index described.

Q1) Will a regular INSERT that attempts to insert duplicate data get
an error back or just a warning?

Q2) How can I set things up so that a BULK INSERT would NOT allow
duplicates to be entered into the table?

Thanks,
Wes Gamble

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация