tags:

views:

50

answers:

5

hi, in MySQL 5.1, i named a field 'Starting'. However, eachtime i would used an SQL query, it would say invalid SQL syntax. After some google search, i found out that STARTING is a reserved SQL word, but Undocumented. Can anyone tell me what it is? thanks.

http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

A: 

STARTING WITH is a term from some other SQL dialect (I can' find which one, though: It's not ANSI SQL)

Pekka
+2  A: 

Probably it is reserved for future use. Sometimes proposals (or features) which aren't implemented yet lead to reservaton of keywords. The advantage would be that your sql statements will not break if it will be implemented in the future.

stacker
+2  A: 
  1. It's an undocumented special word with no use, and is reserved for future use
  2. You should be enclosing table and column names in backticks (which would have avoided this scenario).
nathan
A: 

"STARTING" is a reserved word in MySql. See http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-1.html for all reserved words used in MySql 5.1. Reserved words is the word which is reserved for some internal operation or for future use. These may be use as a keyword in future.

chanchal1987
A: 

This word is reserved for future use. That's why you always should escape field names like this:

SELECT `starting` FROM....
Hippo