aspose file tools*
The moose likes JDBC and the fly likes Are Column names case sensitive in SQL queries? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Are Column names case sensitive in SQL queries?" Watch "Are Column names case sensitive in SQL queries?" New topic
Author

Are Column names case sensitive in SQL queries?

Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hi All,

We just upgraded our database from MySQL 4.1 to MySQL 5.0. A query I had that worked in 4.1 does not work now. The message I am getting is :

SQL Error Unknown column 'equipmenttable.equipmenttype' in 'on clause'

The column name that I am having problems with is equipmentType. I refer to it as equipmenttype (small t) instead of the capital T in the table definition.

Anyone know why this would work in one version and not the other?
Thanks.
Paul Campbell
Ranch Hand

Joined: Oct 06, 2007
Posts: 338
No, it's not case sensitive.

There were changes to the join syntax in MySQL 5, this could be cause your error. Could you post your query?
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
I think you might be right. I did have to change several other queries when we switched.

Here is the query that is causing me woe's:
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Thank you so much. I rearranged the joins of the query and am no longer getting the error. Thanks for saving me from going down the wrong path on this one.

Here is the query that works :
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Are Column names case sensitive in SQL queries?