Hi Oleg

I don't want to fight with you, but INSERT also supports SET:

INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
    [INTO] tbl_name
    SET col_name={expr | DEFAULT}, ...

And here is the REPLACE syntax:

REPLACE [LOW_PRIORITY | DELAYED]
    [INTO] tbl_name
    SET col_name={expr | DEFAULT}, ...


In fact, both INSERT and REPLACE support the *exact same* 3 different syntaxes:

REPLACE/INSERT [LOW_PRIORITY | DELAYED]
    [INTO] tbl_name [(col_name,...)]
    VALUES ({expr | DEFAULT},...),(...),...

Or:

REPLACE
/INSERT [LOW_PRIORITY | DELAYED]
    [INTO] tbl_name
    SET col_name={expr | DEFAULT}, ...

Or:

REPLACE
/INSERT [LOW_PRIORITY | DELAYED]
    [INTO] tbl_name [(col_name,...)]
    SELECT ...


But UPDATE only has 1 syntax:

UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
    SET col_name1=expr1 [, col_name2=expr2 ...]
    [WHERE where_condition]
    [ORDER BY ...]
    [LIMIT row_count]


I can also post code that proves this, although you can save me some time by just reading the 3 pages of MySQL documentation.

- Frank



Oleg Broytmann wrote:
On Tue, Dec 04, 2007 at 02:19:31PM -0800, Frank Conradie wrote:
  
I will have to disagree again - please read the page that you link to 
below carefully: "|REPLACE| works exactly like |INSERT|
    

   SQLObject is more interested in syntax. SET and name/value pairs make it
much more like UPDATE than INSERT.

Oleg.