Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

We thought of upgrading MySQL to new version 5.5.16. While testing the scripts with the new version, I had found one column Maxvalue is a Keyword in latest version.

For this one, we need to change all the application where it is used. Instead is there any way to make the keyword Maxvalue interpret as a Normal column, so that we will not have to change our application.

Maxvalue is just column name, it is not the maximum value.

And I am looking for some other option apart from backticks: `Maxvalue`.

share|improve this question

3 Answers 3

I can see these choices

  • don't rename add backticks everywhere
  • rename the column

Like this

share|improve this answer
Yeah I am aware of this, By using tilde we can continue this. I was looking for any other way, instead of changing in all places. –  Phanindra Oct 4 '11 at 8:06
unfortunately backticks are the way to do dereference keywords, so if that's not an option, the only other possibility is renaming the column, as @gbn said. –  Derek Downey Oct 4 '11 at 12:10

Not that I'm aware of, but you can keep the column name as "Maxvalue" if you wish, but you must remember to always dereference it when running a SQL query as follows;

SELECT max(`Maxvalue`) AS max_value
FROM `table_name`
share|improve this answer

The answers from Dave and gbn are pretty much the only way.

You could set ANSI_QUOTES for the session's SQL MODE but you would have to derefernce using double quotes instead of the backquote (the whole sentence is a link)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.