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
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
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 ?
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"
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
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
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;
[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
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