I’m still quite a mySQL newbie, so I would like to do this right to avoid future mishaps.
What is the right way to detect when do I need to UPDATE an entry in a table or INSERT a new one?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to insert a record if a value does not exist in a certain column, or update it when it exists, you should declare a
UNIQUEconstraint on the column and use this syntax: