Re: question+comment : Re: set "DEC" as a column name : forbidden

2006-05-31 Thread Jeremy Cole
Hi Gilles, I search in the manual with "ERROR 1064", and then get the page : http://dev.mysql.com/doc/refman/4.1/en/error-messages-server.html Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR) Message: %s near '%s' at line %d I cannot figure out what is wrong from this info, whereas error code 106

Re: question+comment : Re: set "DEC" as a column name : forbidden

2006-05-31 Thread Gilles MISSONNIER
Hello again Paul, 1-Why the error code (1064) can't lead explicitly to the syntax problem ? I'm sorry, I don't understand the question. The mysql command returned the error code [ ERROR 1064 (42000) ] I search in the manual with "ERROR 1064", and then get the page : http://dev.mysql.com/do

Re: question+comment : Re: set "DEC" as a column name : forbidden

2006-05-31 Thread Paul DuBois
At 17:38 +0200 5/31/06, Gilles MISSONNIER wrote: Thank you Paul DuBois. I have 2 questions for you : 1-Why the error code (1064) can't lead explicitly to the syntax problem ? I'm sorry, I don't understand the question. 2-Could you tell me how I could go directly to the relevant page ?

question+comment : Re: set "DEC" as a column name : forbidden

2006-05-31 Thread Gilles MISSONNIER
Thank you Paul DuBois. I have 2 questions for you : 1-Why the error code (1064) can't lead explicitly to the syntax problem ? 2-Could you tell me how I could go directly to the relevant page ? [ Hard for you to feel like a lambda user in MySQL ] my comment : The "Search the MySQL manual"

Re: set "DEC" as a column name : forbidden

2006-05-30 Thread Paul DuBois
At 15:46 +0200 5/30/06, Gilles MISSONNIER wrote: Hello I could not find the answer through the online "Search the MySQL manual". I run MySQL 4.1 In the 4.1 manual, the reserved words are listed here: http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html "DEC" is in the list. Identifier

Re: set "DEC" as a column name : forbidden

2006-05-30 Thread Chenzhou CUI
You are right, the "DEC" is a reserved keyword in the MySQL system. We use "DE" in our databases, which will be better then "DECL". cheers, Gilles MISSONNIER wrote: Hello I could not find the answer through the online "Search the MySQL manual". I run MySQL 4.1 In astronomy, RA and DEC are w

Re: set "DEC" as a column name : forbidden

2006-05-30 Thread Thomas Lundström
Hi Gilles! Just use `dec` and it will work fine. DEC is as you suspected a reserved word and can only be used as column namne if you put it in ``-syntax. Example: create table astronomicalvskeywords ( `dec` float not null, `ra` float not null ); ...will create: desc astronomicalvskeywords;

RE: set "DEC" as a column name : forbidden

2006-05-30 Thread Jay Blanchard
[snip] It seems that the reason is that "DEC" is a keyword standing for "decimal". I do not understand why this cannot be allowed for a column name. [/snip] There are several reserved keywords in MySQL, none of which are recommended for column names. You can try the SQL statement using backtick

set "DEC" as a column name : forbidden

2006-05-30 Thread Gilles MISSONNIER
Hello I could not find the answer through the online "Search the MySQL manual". I run MySQL 4.1 In astronomy, RA and DEC are widely used coordinate names. Then I try to add a column named "DEC" : mysql> alter table my_table add dec float; ERROR 1064 (42000): You have an error in your SQL syntax