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.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss