Using LIKE operator with arabic in SQL Server

Last Reply 2 months ago By pandeyism

Posted 2 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

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