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
30014
August 22, 2005 07:49AM
Re: 'condition' is not allowed as column name
10966
August 22, 2005 12:46PM


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.