Skip to content

Instantly share code, notes, and snippets.

@j717273419
Created April 11, 2017 07:10
Show Gist options
  • Save j717273419/99ab2fe26da8f1441376e468e7cf87cc to your computer and use it in GitHub Desktop.
Save j717273419/99ab2fe26da8f1441376e468e7cf87cc to your computer and use it in GitHub Desktop.
sql server 查询 区分大小写 Case-Sensitive
--sql server like 查询 不区分大小写
select * from [dbo].[Sso_Authtication]
where Sa_App_Name like '%System_a%'
--sql server like 查询 区分大小写
select * from [dbo].[Sso_Authtication]
where Sa_App_Name
collate Chinese_PRC_CS_AS_WS like '%System_a%'
--sql server 等于= 查询 不区分大小写
select * from [dbo].[Sso_Authtication]
where Sa_App_Name = 'System_a'
--sql server 等于= 查询 区分大小写
select * from [dbo].[Sso_Authtication]
where Sa_App_Name
collate Chinese_PRC_CS_AS_WS = 'System_a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment