On Jan 8, 2008 12:00 AM, Brian Marshall <sn...@beyondboredom.net> wrote:
> I can't testify for any other database, but mysql lets you use the same
> syntax for both operations.
>
> INSERT INTO `foo` SET `bar` = 'foobar'
> UPDATE `foo` SET `bar` = 'wombat' WHERE `bar` = 'foobar'

It even lets you mix the two with REPLACE INTO, which will do an
INSERT, unless the record is already present, in which case it'll do
an UPDATE instead.

Cheers,
-- 
Philip Newton <philip.new...@gmail.com>

Reply via email to