In this article I am going to explain how to Check Case-Sensitivity in SQL Server.
In previous article I have explained how to create comma separated list in Sqlserver, how to encrypt store procedure, view and function in sql server and howto take database Backup and restore using command T-Sql.
SQL server determines case sensitivity by collation. COLLATE is the T-SQL clause used to specify a particular collation for an expression. We can use this to validate the users enter password at the time of login.
select * from tablename where column_name='string' COLLATE SQL_Latin1_General_CP1_CS_AS
Create table #test
insert into #test(id,name) values(1,'vijay'),(2,'Amit'),(3,'JOHN')
Select * from #test where name ='vijay' COLLATE SQL_Latin1_General_CP1_CS_AS
What do you think about this article?
If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.