Possible Duplicate:
Are there any reserved words in SQLite?
I have a big database (veekun’s pokedex for those who know of it) and one table has a column named “order”. It’s for sorting purposes, and I’m trying to ORDER BY that column, but it is a problem since ORDER is, of course, a reserved word. The two options I see are
- Rename this column (but I’d like to avoid modifying the database as much as possible)
- Get around this somehow
So, in the case of 1, how would I go about renaming the column without messing up the database too much?
In the case of 2, I can’t imagine what I could do, but maybe there’s a trick I don’t know of to get around this.
I’m using SQLite and PHP.
you just need to surround keyword collisions in `backticks`