Jump to content

Avoid Record duplication in MYSQL Server


Recommended Posts

Hi All,

I am using MySql server as my backend for current project. I need to store around five records per second to my database. Is there any way to check for duplicate record present in the databse while inserting the data? Retrieving the complete data and checking it with current record is not a good solution all the time I guess.

Thanks in advance,

Suvin.

Link to comment

Hi All,

I am using MySql server as my backend for current project. I need to store around five records per second to my database. Is there any way to check for duplicate record present in the databse while inserting the data? Retrieving the complete data and checking it with current record is not a good solution all the time I guess.

Thanks in advance,

Suvin.

You can use "REPLACE" which will "INSERT" if it doesn't exist or, "DELETE" the old record and then "INSERT" if it does.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.