MYSQL LIKE 區分大小寫匹配

2021-09-06 16:45:54 字數 456 閱讀 2718

原文 mysql like 區分大小寫匹配

mysql使用like匹配時預設是不區分大小寫的.

例:select * from table_name where a like 'wss%'

select * from table_name where a like 'wss%'

匹配的結果是一致的.

區分大小寫匹配:

select * from table_name where binary a like 'wss%' 

select * from table_name where binary a like 'wss%' 

這樣就行區分大小寫匹配

或者我們在建立欄位時設定大小標識

create table table_name( wss varchar (20) binary )

區分大小寫

這個規則會與以下各個元素匹配 這些元素不能在同乙個文件中同時出現,因為它們都有相同的 id 值 id mostimportant this is important 親自試一試 請注意,類選擇器和 id 選擇器可能是區分大小寫的。這取決於文件的語言。html 和 xhtml 將類和 id 值定義為區...

區分大小寫

設定大sql指令碼大小寫敏感 use master go alter database databasename collate chinese prc cs ai go設定參考值 ci ai 不區分大小寫 不區分重音 不區分假名型別 不區分寬度 ci ai ws 不區分大小寫 不區分重音 不區分假...

查詢區分大小寫

在sql2000和7.0的查詢語句中,區分大寫的查詢方法 sql2000,就用下面的方法.就是在欄位名後加 collate chinese prc cs as ws 區分大小寫 全半形字元的方法 測試資料 create table 表 fd varchar 10 insert into 表 sele...