Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm facing a problem with mysql. A query select * from range; works on mysql 5.0.22 but does not work mysql 5.1.61. but it works with backtick: i.e.

select * from `range`; 

Kindly help in this regard.

I want mysql 5.1.61 to execute the query without backtick (`)

share|improve this question
2  
Is "abc" the name of the table or is that just an example? The reason I ask is because the actual table name may be a reserved word in v5.1 but not in v5.0. –  John Gardeniers Oct 10 '12 at 10:51
    
abc is an example. actual table name is range –  User4283 Oct 10 '12 at 11:28
    
I've check mysql reference Manual. dev.mysql.com/doc/refman/5.1/en/reserved-words.html word RANGE is reserved in my MySQL 5.1 but not in 5.0. is there any possibility that i could execute query without backtick whatif the word is reserved. –  User4283 Oct 10 '12 at 11:42
1  
Either use backticks or change the table name. Your choice. –  John Gardeniers Oct 10 '12 at 11:51
1  
John, to me your answer is a proper technical analysis, and deserves to be a real answer so it can be upvoted. I'd upvote it. Any chance you could post it? –  MadHatter Oct 10 '12 at 13:16

1 Answer 1

range is a reserved word in 5.1

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

So if you use it, you need to use the back ticks in order to tell mysql that you aren't using the reserved word. range wasn't in 5.0

share|improve this answer
    
Yes i read reference manual and change mysql table name instead of range to someother, Thanks Jhon for the hint. –  User4283 Oct 12 '12 at 15:09

Your Answer

 
discard

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.