mysql表名不能大写 [英] Mysql table name not working in uppercase
本文介绍了mysql表名不能大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要更改mysql,同时接受大写和小写表名,
I need to change mysql is accept both uppercase and lowercase table name ,
select * from users
上面的查询工作正常,但是下面的查询无效,
the above query working fine but the below query is not working,
select * from USERS
推荐答案
这取决于您的系统(主要值是Unix,Windows和Mac OS).
It depends on your system (Unix, Windows and Mac OS for the main values).
您需要将系统变量"lower_case_table_names"设置为1或2,以使数据库不区分大小写.
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;
或
SET lower_case_table_names=2;
这篇关于mysql表名不能大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文