I am creating a table below
CREATE TABLE _testseif
(
name NVARCHAR(max)
)
INSERT INTO _testseif (name)
VALUES (N'آ'), (N'ا')
When I sort these values:
SELECT *
FROM dbo._testseif
ORDER BY name
I get these results:
Now in C#, I wrote a unit test as shown here:
[TestMethod]
public void TestMethod1()
{
var li = new List<string>() { "آ" ,"ا" };
var li1 = li.OrderBy(x => x).ToList();
}
And the result I get is this:
Why is there a difference in sorting between SQL Server and C#?
