Problems with new reserved word 'force'

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Dear all,

I have a database in which one column is titled 'force'.  Now that
this has become a reserved word, virtually no commands will execute,
including of course a query to change the column name.

Any ideas?

Thanks in advance,
James Boulter

Re: Problems with new reserved word 'force'

James Boulter wrote:
Quoted text here. Click to load it

Putting the column name in backticks (``) in your SQL statements
protects it from being interpreted as anything besides an identifier.
This is useful if your table or column name is a reserved word, or
contains whitespace or special characters.

   SELECT `force` FROM `table`;

Note that if you need to do this for a table.column combination, you
need to quote each part individually.

   SELECT `table.column`
   FROM `table`

Gives an error that there is no column in `table` named `table.column`.
  You should instead use:

   SELECT `table`.`column`
   FROM `table`

Bill K.

Site Timeline