Using LIKE operator with arabic in SQL Server

Last Reply one year ago By pandeyism

Posted one year 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

You are viewing reply posted by: pandeyism one year ago.
Posted one year ago Modified on one year 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'لا%'