tags:

views:

31

answers:

2

how can i make it so that the tables are case insensitive?

+7  A: 

Table names are case-sensitive based on the OS's filesystem. On windows, filenames are not case-sensitive, so you can specify either. However, on Linux, filenames are case-sensitive. Hence the difference.

Best practice is to make your SQL conform exactly to the table name.

MySQL Documentation on identifier case sensitivity

Chris Henry
Thanks for digging up the reference, @ircmaxwell
Chris Henry
No problem. Your answer is spot on anyway, so it's not worth me answering as well to add the reference... +1
ircmaxell
+2  A: 

Tables in MySQL are files (named the same as the table) behind the scenes. If those files are stored on a case-sensitive filesystem (like, say, just about every FS Linux supports), then MySQL will care about the case of table names. On the other hand, Windows filesystems tend to ignore case when looking up files, so any case could work.

You may be able to use a different engine for the database (InnoDB may be case insensitive, as it stores its tables differently), but really, you ought to be using consistent case all the time -- that'd make case sensitivity irrelevant.

cHao