Paul DuBois wrote:

At 12:22 -0500 12/17/03, Mayuran Yogarajah wrote:

I am using case sensitive table names when I create tables
like :

CREATE TABLE MyTest;

If I want to do a select from this table, I have to do
SELECT * FROM MyTest, not SELECT * FROM mytest.

How can I make it so that the table name is still MyTest
but selects work with mytest ?


You can set the lower_case_table_names server variable to 1.
Then table names will not be treated as case sensitive,
and you can write them in any lettercase in your queries.

Two points to note, though:

- Before setting the varable, rename all your tables to lowercase.
Otherwise they won't be recognized properly when you set the variable.
(The way it works is that if causes the server to lowercase the names
of new tables when they are created.)

- Although you will be able to refer to tables using any lettercase,
*within a given query*, you must refer to the table consistently.
See http://www.mysql.com/doc/en/Name_case_sensitivity.html for
an example.


Is it possible to change the variable lower_case_table_names from mysql commandline?
I tried to change it by doing this :
mysql> SET lower_case_table_names=1;


and got the error :
ERROR 1193: Unknown system variable 'lower_case_table_names'


Thanks





-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to