| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Rob Wultsch | Date: | December 17 2007 3:55pm |
| Subject: | Re: Update but insert if not exist | ||
| View as plain text | |||
On Dec 16, 2007 10:29 AM, Afan Pasalic <afan@stripped> wrote: > try REPLACE > http://dev.mysql.com/doc/refman/5.1/en/replace.html > > -afan Replace will not do an update. All previous data will be lost. A mysql-centric alternative solution would be to use INSERT ... ON DUPLICATE KEY UPDATE http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
| Thread | ||
|---|---|---|
| • Update but insert if not exist | Steffan A. Cline | 16 Dec |
| • Re: Update but insert if not exist | Afan Pasalic | 16 Dec |
| • Re: Update but insert if not exist | Rob Wultsch | 17 Dec |
| • Re: Update but insert if not exist | J Trahair | 17 Dec |
| • Re: Update but insert if not exist | Jay Pipes | 17 Dec |
