473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Duplicate entry for unique field

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
2 6784

"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jjliu | last post by:
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...
2
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
1
by: Joseph Chase | last post by:
I am running version 4.1.13a-log on a Mac XServe. How can I receive a 'duplicate entry' error for an UPDATE? An update isn't creating an entry, so why this error message? ...
5
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone |...
8
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on...
5
by: baur79 | last post by:
Hi guys i try to run this code in loop and to pass even the entry is duplicated def email_insert_in_db(email): sql="INSERT INTO emails (email) values ('%s') "%(email)...
9
by: Tom_F | last post by:
To comp.databases.ms-access -- I just discovered, to my more than mild dismay, that some tables in my Microsoft Access 2003 database have duplicate numbers in the "AutoNumber" field. (Field...
4
theaybaras
by: theaybaras | last post by:
Hi All, I am creating a databse of articles and related information. I need to find a way to prevent the user from inputting duplicate information in a few forms. In one of these forms I can...
1
by: chicago1985 | last post by:
I have a unique constraint in my Oracle table for 3 fields. If I enter duplicate info on the table using Oracle client I will get an Ora message error ORA-00001 that tells me it is a duplicate entry...
1
by: rdsandy | last post by:
Hi, I have a table Risk, a table Mitigation and a table RiskArchive. I am taking the RiskID, Criticality and MitigationPlan fields from Risk, and MitigationActionID from Mitigation and inserting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.