0
Case sensitive search in SQL
Posted by Rajendra Prasad Panchati
on
Monday, February 08, 2010
in
SQL Server
COLLATE is the Keyword which help you to compare case sensitivity.
Syntax: COLLATE (Collation Value)
EX: COLLATE SQL_Latin1_General_CP1_CS_AS
you should keep this part between the comparision statement
EX: SELECT * FROM USERS
WHERE USER_NAME COLLATE SQL_Latin1_General_CP1_CS_A = 'Your String'....
You can get the Collation Value from the properties of your database on which you are currently working..
Your Database-->Properties-->General(Under Maintenance).
Syntax: COLLATE (Collation Value)
EX: COLLATE SQL_Latin1_General_CP1_CS_AS
you should keep this part between the comparision statement
EX: SELECT * FROM USERS
WHERE USER_NAME COLLATE SQL_Latin1_General_CP1_CS_A = 'Your String'....
You can get the Collation Value from the properties of your database on which you are currently working..
Your Database-->Properties-->General(Under Maintenance).
More
Less