Collations in SQL Server provide
sorting rules,case,and accent sensitivity properties for our data.
select distinct (Item) COLLATE sql_latin1_general_cp1_cs_as
FROM (
select 'abcd' item
union all select 'ABCD'
union all select 'defg'
union all select 'deFg') items
Output:-
ABCD
abcd
deFg
defg select distinct (Item) COLLATE sql_latin1_general_cp1_ci_as
FROM (
select 'abcd' item
union all select 'ABCD'
union all select 'defg'
union all select 'deFg') items
Output:-
ABCD
deFg