List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 18 2001 12:44am
Subject:Re: Overwrite only if it exists HELP please!
View as plain text  
At 5:34 PM -0700 9/17/01, Armando Cerna wrote:
>I need to insert a phone number into a table.  I would do this with the
>insert command except I think that it would create duplicate entries even
>though they are exactly the same is there a  way that I can have it not enter
>the data if it exists already

INSERT IGNORE

will ignore the new record if it duplicates an existing record on
a primary key value.

It's in the manual:
http://www.mysql.com/doc/I/N/INSERT.html

>
>TIA
>Armando
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread85712@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Paul DuBois, paul@stripped
Thread
Overwrite only if it exists HELP please!Armando Cerna18 Sep
  • Re: Overwrite only if it exists HELP please!Paul DuBois18 Sep
    • Re: Overwrite only if it exists HELP please!Armando Cerna18 Sep
      • Re: Overwrite only if it exists HELP please!Paul DuBois18 Sep