469,081 Members | 1,821 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

Problems with new reserved word 'force'

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
Jul 23 '05 #1
1 1549
James Boulter wrote:
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.


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`

Regards,
Bill K.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Laphan | last post: by
2 posts views Thread by Matthew Cascio | last post: by
2 posts views Thread by Aravind | last post: by
8 posts views Thread by William Bradley | last post: by
2 posts views Thread by tshad | last post: by
3 posts views Thread by VK | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.