List:General Discussion« Previous MessageNext Message »
From:Aveek Misra Date:February 24 2011 11:13am
Subject:Re: I can't have "group" as a column name in a table?
View as plain text  
Use a quote around the column name or explicitly specify the column as
<table>.<column> (as for e.g. mytable.group) in the query. For more details
refer to http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html

Thanks
Aveek

On Feb 24, 2011, at 4:36 PM, Dave M G wrote:

> MySQL users,
> 
> Simple question:
> 
> In one table in my database, the column was named "group".
> 
> I kept getting failed query errors until I renamed the column.
> 
> I've never before encountered a situation where MySQL mistook a column
> name for part of the query syntax.
> 
> Should I never use the word "group" for column names? Seems a little
> silly. Is there a way to protect column names to that there is no confusion?
> 
> -- 
> Dave M G
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 


Thread
I can't have "group" as a column name in a table?Dave M G24 Feb
  • Re: I can't have "group" as a column name in a table?Aveek Misra24 Feb
    • Re: I can't have "group" as a column name in a table?Simcha Younger24 Feb
    • Re: I can't have "group" as a column name in a table?mos24 Feb
    • Re: I can't have "group" as a column name in a table? [SOLVED]Dave M G25 Feb
  • Re: I can't have "group" as a column name in a table?joao24 Feb
  • Re: I can't have "group" as a column name in a table?Johan De Meersman24 Feb
  • Re: I can't have "group" as a column name in a table?joao24 Feb
  • Re: I can't have "group" as a column name in a table?joao24 Feb