I want to insert if not exists, if exists I want to update, how to do this
Enter your MySQL question at the top of this page and click Get An Answer.
Tell us how quickly you want your MySQL question answered.
Connect with your programmer via online chat or telephone call.
I want to insert if not exists, if exists I want to update, how to do this
Write a sql like this:
INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;
Read More: http://dev.mysql.com/doc/refman/5.1/en/insert-on-duplicate.html
Thank you.
Byron Narciso
Programmer
Whether you have a quick question while preparing your taxes, troubleshooting a computer problem, or need to hire an attorney, ExpertHelp is the most convenient and affordable way to connect with the right service professional to get the job done.
ExpertHelp has been in business since 2011, is an A+ Rated Better Business Bureau accredited member, and offers a 100% satisfaction guarantee on every question you ask!