Perbandingannya peka huruf besar-kecil sehingga Anda perlu membandingkannya dengan c# dan C#. Di SQL Server 2008 Anda dapat menggunakan huruf besar .
declare @T table
(
ID int identity,
Skills XML
)
insert into @T values
('<Skills><Skill>C#</Skill><Skill>ASP.NET</Skill><Skill>VB.NET</Skill></Skills>')
insert into @T values
('<Skills><Skill>CB.NET</Skill><Skill>ASP.NET</Skill><Skill>c#</Skill></Skills>')
insert into @T values
('<Skills><Skill>F#</Skill><Skill>ASP.NET</Skill><Skill>VB.NET</Skill></Skills>')
select ID
from @T
where Skills.exist('/Skills/Skill[contains(., "C#") or contains(., "c#")]') = 1
Hasil:
ID
-----------
1
2
Pembaruan:
Ini juga akan berhasil.
select T.ID
from @T as T
cross apply T.Skills.nodes('/Skills/Skill') as X(N)
where X.N.value('.', 'nvarchar(50)') like '%C#%'