At 4:27 PM -0400 9/21/01, Jason Frisvold wrote:
>Currently I'm checking to see if a value exists in the database before
>deciding whether to update it or insert it.  Would this be quicker to do if
>I merely used REPLACE?  Is that the purpose of the REPLACE command?  If it
>exists, just update it, and if it doesn't exist, insert it?

Right.  The table must have a PRIMARY KEY or UNIQUE index.
The decision as to whether to replace or insert is based on whether
a record with the same unique key value already exists.

>
>Thanks,
>
>---------------------------
>Jason H. Frisvold
>Senior ATM Engineer
>Engineering Dept.
>Penteledata
>CCNA Certified - CSCO10151622
>[EMAIL PROTECTED]
>---------------------------
>"So Long and Thanks for all the Fish" -- Douglas Adams [1952-2001]


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to