Skip navigation links

MySQL Forums :: Data Dictionary & Information Schema :: 'condition' is not allowed as column name


Advanced Search

Re: 'condition' is not allowed as column name
Posted by: Roland Bouman ()
Date: August 22, 2005 12:46PM

Yes, quote you identifiers.

The normal quotechar is the backtick (`):

create table rules (`condition` varchar(255))

this is specific for mysql. ANSI SQL also defines this feature, but with the double quote (") as delimiter:

create table rules ("condition" varchar(255))

because the double quote is normally a string delimiter in mysql, you have to tell mysql specifically to use the ANSI_QUOTES SQL mode, or just the ANSI mode.

set sql_mode := 'ANSI'

you can also specify tha ansi mode at server startup.

for server modes, see

http://dev.mysql.com/doc/mysql/en/ansi-mode.html
and
http://dev.mysql.com/doc/mysql/en/sql-mode.html
and
http://dev.mysql.com/doc/mysql/en/server-sql-mode.html

to find out what suits you best.

for quoting and reserved words, see:

http://dev.mysql.com/doc/mysql/en/legal-names.html
and
http://dev.mysql.com/doc/mysql/en/reserved-words.html

Options: ReplyQuote


Subject Views Written By Posted
'condition' is not allowed as column name 25181 leo lou 08/22/2005 07:49AM
Re: 'condition' is not allowed as column name 9145 Roland Bouman 08/22/2005 12:46PM
Re: 'condition' is not allowed as column name 5083 Tom Willson 02/23/2009 01:16PM
Re: 'condition' is not allowed as column name 5301 Tom Willson 02/23/2009 01:33PM
Re: 'condition' is not allowed as column name 4803 Roland Bouman 02/23/2009 01:36PM
Re: 'condition' is not allowed as column name 4598 Tom Willson 02/23/2009 01:50PM
Re: 'condition' is not allowed as column name 4601 Roland Bouman 02/23/2009 01:53PM
Re: 'condition' is not allowed as column name 4315 Roland Bouman 02/23/2009 01:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.