Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2003
    Posts
    24

    Unanswered: 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

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    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.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    rats! beat me by one minute AGAIN!!!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    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.

  6. #6
    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...

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1000s of lines of code?

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

    don't keep working around the issue
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •