How To do Case Sensitive String Match in SQL Server
How To do Case Sensitive String Match in SQL Server In this post we will try to understand how can we perform case sensitive search/ string match in SQL server. As most of us continue to use SQL server with the default setup where the regular string match is case-insensitive. So, to understand the concept let's take an example. Let say we have a table with 2 columns ID and UserName, i.e., like this. CREATE TABLE TestTable ( Id int, [UserName] varchar(255) ); Also let's add some data to our table using the following script. insert into TestTable Values (1,'Kumar'); insert into TestTable Values (2,'Prateek'); insert into TestTable Values (3,'Kumar Prateek'); insert into TestTable Values (4,'KUMAR'); insert into TestTable Values (5,'PRATEEK'); insert into TestTable Values (6,'KUMAR PRATEEK'); And so, the data in our table looks like this. Id UserName 1 Kumar...