views:

28

answers:

2

I have a table let say is it called "test". I use Ubuntu and MySQL 5.1.41-3ubuntu12.6 version. If I try to do "select * from test" it works but if try "select * from Test" or "select * from TEST" it does not work. Does any had this problem, or knows how to solve it? Thank you.

+2  A: 

It depends on your system (Unix, Windows and Mac OS for the main values).

You need to set your system variable "lower_case_table_names" to 1 or 2, to make your database case insensitive.

SET lower_case_table_names=1;

or

SET lower_case_table_names=2;

More at Mysql.com and here

Colin Hebert
thanks for your answer :)
Calin Martinconi
A: 

Table names case sensitivity depends on the operating system,.

on windows table names are case insensitive while on *nix systems table names are case-sensitive,.

its always a good practice to use lower-case for table names, when creating the table and when accessing the table through a query., this way you would never face any case-sensitivity problems.,

ovais.tariq