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.
STARTING WITH
is a term from some other SQL dialect (I can' find which one, though: It's not ANSI SQL)
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.
- It's an undocumented special word with no use, and is reserved for future use
- You should be enclosing table and column names in backticks (which would have avoided this scenario).
"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.
This word is reserved for future use. That's why you always should escape field names like this:
SELECT `starting` FROM....