Tuesday, July 14, 2009

SQL Server Case Sensitive Search

select [Name] from suppliers where [name] like '%Test%'
RESULTs-3
1. Sampath test
2. Sampath Test
3. Sampath Test_view

--WITH CASE SENSITIVE SEARCH--------------------------------
select [Name] from suppliers where [name] like '%Test%' COLLATE SQL_Latin1_General_CP1_CS_AS

RESULTs-2
1. Sampath Test
2. Sampath Test_view

No comments:

Post a Comment