Using LIKE operator with arabic in SQL Server

Last Reply 11 months ago By pandeyism

Posted 11 months ago

how to select matching data from from sql that the table has arabic names

I have used several condition in whare clause like below

LIKE '%'+ @myUser + '%'

LIKE N'%'+ @myUser + '%'

but couldn't return any rows

Posted 11 months ago Modified on 11 months ago

Hi satabeach,

Refer below sample query.

SQL

DECLARE @FilterDataInArabic AS TABLE(Name NVARCHAR(MAX))
INSERT INTO @FilterDataInArabic VALUES(N'لا أتكلم العربية')
INSERT INTO @FilterDataInArabic VALUES(N'ل أتكلم العربية')

SELECT * FROM @FilterDataInArabic
WHERE Name LIKE N'لا%'