標籤:style color 使用 io for ar log sp
CREATE TABLE `staticcatalogue` (
`Source` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ‘‘,
`CreatedDate` datetime DEFAULT NULL,
`Val_tr` text CHARACTER SET utf8 COLLATE utf8_turkish_ci,
`Val_ro` text CHARACTER SET utf8 COLLATE utf8_romanian_ci,
`Val_gr` mediumtext CHARACTER SET greek,
`Val_ar` mediumtext CHARACTER SET cp1256,
`Val_fr` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci,
PRIMARY KEY (`Source`),
KEY `PermissionID` (`PermissionID`),
CONSTRAINT `staticcatalogue_ibfk_1` FOREIGN KEY (`PermissionID`) REFERENCES `permission` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=‘Static language catalogue‘
這個建立表的SQL語句裡包含了很多的校對規則,當與其他表串連進行查詢的時候,Source欄位會區分大小寫,其他欄位的校對是....._ci,是不區分大小寫。若要比較時Source不區分大小寫可以再比較語句後添加COLLATE utf8_general_ci,如......LEFT JOIN staticcatalogue x2 ON x2.Source = c.Name COLLATE utf8_general_ci
mysql預設是不區分大小寫。查看一個表的詳細資料可以使用命令: show create table talename.