If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mySQL and Case Sensitive Table Name issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-19-05, 23:44
mamin mamin is offline
Registered User
 
Join Date: Oct 2003
Posts: 24
mySQL and Case Sensitive Table Name issue

Hi,
I am new to mySQL and I have having issue with table name being case sensitive. How can I disable this option when I issue SQL Statement. My Local server works fine, but when i use same code with my hosting server I get error...that table not found. If I change table name in exact CASE as actual table name then it will be fine..Coming from MS SQL environment...this is kind of annoying to have table name in SQL statement as case sensitive..

I do not think I can ask my hosting company to turn this off since they must be hosting to another clients as well..So only option I see is in my connection string or somewhere else if I can turn this off
Reply With Quote
  #2 (permalink)  
Old 02-19-05, 23:54
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
Don't see the problem. Use all upper case or all lower case when you name your tables. stick to that naming convention at all times. then you know that you will either use all upper or all lower in your scripts or any time you reference the tables.
Reply With Quote
  #3 (permalink)  
Old 02-19-05, 23:55
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
you actually have one more option

write your sql in the same case as you declare your tables

drop and recreate them and stick to one convention

i prefer all lower case myself

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #4 (permalink)  
Old 02-19-05, 23:56
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
rats! beat me by one minute AGAIN!!!
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 02-19-05, 23:56
mamin mamin is offline
Registered User
 
Join Date: Oct 2003
Posts: 24
Problem is I am changine application which was written by someone..and he did quite bad naming convention in table name..there is no consistency in table name which is causing me a issue.
Reply With Quote
  #6 (permalink)  
Old 02-19-05, 23:58
mamin mamin is offline
Registered User
 
Join Date: Oct 2003
Posts: 24
Quote:
Originally Posted by r937
you actually have one more option

write your sql in the same case as you declare your tables

drop and recreate them and stick to one convention

i prefer all lower case myself

I wish I would have such choice..1000s of line of code is written by someone else and this will create bigger problem...If I do this..

Does that mean I am stuck with this issue ?. I am not sure why mySQL is case sensitive...Why can't they make simpler...
Reply With Quote
  #7 (permalink)  
Old 02-20-05, 00:29
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
1000s of lines of code?

use a search & replace utility, e.g. in a text editor

don't keep working around the issue
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On