From: Wes Moxam Date: 2004-10-06T04:14:32+09:00 Subject: Re: Rubyonrails - SQL change request On Wed, 6 Oct 2004 04:00:52 +0900, Jamis Buck wrote: > Thomas Fini Hansen wrote: > > > No the right solution would be to quote the column names: > > > > UPDATE > > `group` = 'test' > > WHEN `id`='1' > > > > That ` is annoying on keyboards with dead keys though. > > > > Seems to me the "standard" (as if there were really a reliable SQL > standard) is to double quote column and table names (if quoting is > needed), and single quote string literals: > > UPDATE the_table > SET "group" = 'test' > WHEN id=1 > I've always done it like this: UPDATE [the_table] SET [group] = 'test' WHEN [id]=1 This may not be the standard, but it works with MS Access and MS SQL Server. Any databound tools that I write escape all table and field names this way. -- Wes