By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,997 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,997 IT Pros & Developers. It's quick & easy.

Duplicate entry for unique field

P: n/a
i have a table with two fields (id and myfield). id is a primary key not nll
auto_increment, and myfield is set as unique...

Due to unique setting for myfield, if i try to insert the duplicate entry
for myfield, i will get error message. i was wondering if this is a way that
I can avoid error message and let mysql just ignore my duplicate entry, and
i can carry on. Thanks a lot for your help.
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"jjliu" <jj***@earthlink.net> wrote in message
news:aL*******************@newsread1.news.atl.eart hlink.net...
i have a table with two fields (id and myfield). id is a primary key not nll auto_increment, and myfield is set as unique...

Due to unique setting for myfield, if i try to insert the duplicate entry
for myfield, i will get error message. i was wondering if this is a way that I can avoid error message and let mysql just ignore my duplicate entry, and i can carry on. Thanks a lot for your help.


You can force an override (ie permit duplicates) by using FORCE I believe in
your query statement.

What programming language are you using or are you scripting inside MySQL?
Jul 19 '05 #2

P: n/a

"jjliu" <jj***@earthlink.net> wrote in message
news:aL*******************@newsread1.news.atl.eart hlink.net...
i have a table with two fields (id and myfield). id is a primary key not nll auto_increment, and myfield is set as unique...

Due to unique setting for myfield, if i try to insert the duplicate entry
for myfield, i will get error message. i was wondering if this is a way that I can avoid error message and let mysql just ignore my duplicate entry, and i can carry on. Thanks a lot for your help.


You can force an override (ie permit duplicates) by using FORCE I believe in
your query statement.

What programming language are you using or are you scripting inside MySQL?
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.