From: Charles O Nutter Date: 2004-10-06T04:07:54+09:00 Subject: Re: Rubyonrails - SQL change request Generally I believe it's best to avoid using reserved words as table names (obviously GROUP is one of those on any database because of GROUP BY, as is SELECT, WHERE, and so on). Usually the recommendation I've heard is to choose a different name for the table or column, rather than trying to sneak around the reserved word by quoting or qualifying that name. It eventually comes back to bite you, no matter what you do. That said, it would still probably be nice if rails fully-qualified the names of database objects to avoid collisions. - Charlie 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 > > - Jamis > > -- > Jamis Buck > jgb3@email.byu.edu > http://www.jamisbuck.org/jamis > > -- Charles Oliver Nutter headius@headius.com