You can use replace into, but note it cannot do
Replace into table VALUES (1,2,3,col4+1);
> -Original Message-
> From: Andy Ford [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 3:59 AM
> To: [EMAIL PROTECTED]
> Subject: update if insert fails
>
> Hi
months ago.
This is definitely one of my favorite commands now.
Donny
> -Original Message-
> From: B. Fongo [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 7:23 AM
> To: 'Andy Ford'; [EMAIL PROTECTED] Mysql. Com
> Subject: RE: update if insert fails
---
||> From: Andy Ford [mailto:[EMAIL PROTECTED]
||> Sent: Friday, April 23, 2004 1:59 PM
||> To: [EMAIL PROTECTED]
||> Subject: update if insert fails
||>
||> Hi
||>
||> Is there such a statement where, if the insert fails (due to a
duplicate
||> record) a
Andy Ford <[EMAIL PROTECTED]> wrote:
>
> Is there such a statement where, if the insert fails (due to a duplicate
> record) an update will happen
>
Take a look at REPLACE and INSERT .. ON DUPLICATE KEY UPDATE statements:
http://dev.mysql.com/doc/mysql/en/REPLACE.html
http://dev.m
Hello Andy,
Friday, April 23, 2004, 12:59:28 PM, you wrote:
AF> Is there such a statement where, if the insert fails (due to a duplicate
AF> record) an update will happen
No, but you might want to look at REPLACE INTO to simulate this
effect.
--
Best regards,
Richard Davey
http://www.phpcomm
Hi
Is there such a statement where, if the insert fails (due to a duplicate
record) an update will happen
Thanks
Andy
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]