Skip navigation links

MySQL Forums :: 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 23892 leo lou 08/22/2005 07:49AM
Re: 'condition' is not allowed as column name 8793 Roland Bouman 08/22/2005 12:46PM
Re: 'condition' is not allowed as column name 4887 Tom Willson 02/23/2009 01:16PM
Re: 'condition' is not allowed as column name 5064 Tom Willson 02/23/2009 01:33PM
Re: 'condition' is not allowed as column name 4616 Roland Bouman 02/23/2009 01:36PM
Re: 'condition' is not allowed as column name 4423 Tom Willson 02/23/2009 01:50PM
Re: 'condition' is not allowed as column name 4400 Roland Bouman 02/23/2009 01:53PM
Re: 'condition' is not allowed as column name 4103 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.