On Mon, 7 Jan 2008 13:49:56 -0600
Jeremy Stephens <jeremy.f.steph...@vanderbilt.edu> wrote:

> Why is the UPDATE syntax so different from INSERT?  If I'm 
> constructing a SQL statement to insert or update based on the 
> existence of a row in some code, I have to have two completely 
> different cases to handle it.  What were the SQL creators thinking?
> 
> What's strange is that I've been working with SQL for years and I've 
> never considered the syntax difference annoying.
> 
> Avast!
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'

I find the VALUES() syntax horribly unnatural and disjointed. I refuse
to use it.


        Brian

Attachment: signature.asc
Description: PGP signature

Reply via email to