MySQL Forums
Forum List  »  Newbie

Re: cannot query a table..
Posted by: Phillip Ward
Date: April 08, 2014 05:24AM

Short answer - backticks (`).
It's a symbol that looks a bit like a single quote, and can usually be found on a button next to the "1" on your keyboard. Wrap you dodgy identifiers in this, as in:

select id, lang, `from`, `to` 
from lang_translation ;

"Unfortunately I cant change the column names"
Why not?
Is this part of some package that you've acquired?

As you've discovered, using reserved words for column/ table names is a terrible idea. If you have any scope to change this, I'd recommend doing so.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
April 08, 2014 04:02AM
Re: cannot query a table..
April 08, 2014 05:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.