我在Windows 7和Red Hat Linux上安装了MySQL。
Windows 7 MySQL版本5.6.15和 Red Hat Linux MySQL版本是5.1.12
我的表格wf_params
包含以下架构
Field Type Collation Null Key Default Extra Privileges Comment
-------------- ------------ --------------- ------ ------ ------- -------------- ------------------------------- ---------
Id bigint(20) (NULL) NO PRI (NULL) auto_increment select,insert,update,references
Name varchar(100) utf8_unicode_ci YES (NULL) select,insert,update,references
LookupId bigint(20) (NULL) YES (NULL) select,insert,update,references
ExternalAuthId bigint(20) (NULL) YES (NULL) select,insert,update,references
LastSync varchar(50) utf8_unicode_ci YES (NULL) select,insert,update,references
TaskType varchar(50) utf8_general_ci YES (NULL) select,insert,update,references
它包含数据:
Id TaskTypeId TaskType Name Type Operator Value Format IsDefault
------ ---------- -------- ----------- ------ -------- --------------- ------ -----------
1 2 Trigger labels String EqualsTo UNREAD,STARRED (NULL) 1
2 1 Trigger albumName String EqualsTo Timeline Photos (NULL) 1
3 2 Action Email String EqualsTo (NULL) (NULL) 0
4 7 Trigger MachineList String (NULL) (NULL) (NULL) 0
当我执行以下查询
时SELECT UPPER( CONCAT(TaskType,'_',TaskTypeId)) 'OperationId' , NAME , VALUE
FROM wf_params WHERE IsDefault = TRUE;
在Linux上它给我输出如:
OperationId NAME VALUE
----------- --------- -----------------
Trigger_2 labels UNREAD,STARRED
Trigger_1 albumName Timeline Photos
但是当我在安装了MySQL的Windows 7上执行查询时,它会给我输出
OperationId NAME VALUE
----------- --------- -----------------
TRIGGER_2 labels UNREAD,STARRED
TRIGGER_1 albumName Timeline Photos
为什么这很开心? 为什么它不能在linux机器上转换为大写?
答案 0 :(得分:1)
检查表格区分大小写。特别要注意的是,在Windows上,表名不区分大小写,在Linux上它们区分大小写。
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html