On Wed, 20 Oct 2010 12:07:03 +0530, S Pratap Singh wrote: > I want to update my database if the key value is already there then it > will update the required field else it will insert the new row in the > same table. > > Insert query works fine but I am not able to figure out how to achieve > this "IF EXISTS then UPDATE else INSERT" using a one liner MYSQL > statement . If someone can give me an example to write such query and > execute it from perl then it would be really appreciated.
This isn't a Perl question, you're asking in the wrong place. This is analogous to asking your auto mechanic what the feeding habits of emus are because you used your car to drive to the zoo. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl1/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/