问题
I am using SQL Server 2008 R2. I want the retrieve the row from table in which data is other than than English.
But when I type the command it returns me nothing.
SELECT *
FROM PARTY
WHERE NAME LIKE 'رانا عطا ربانی'
ORDER BY SRNO
Any suggestions, how to retrieve record like that?
回答1:
Have you tried declaring the string literal as unicode?
SELECT * FROM PARTY
WHERE NAME LIKE N'رانا عطا ربانی'
ORDER BY SRNO
[This will show you all string-related columns in your database, and their collation: Collation conflict SQL Server 2008 ]
来源:https://stackoverflow.com/questions/14411689/sql-select-command-with-unicode-string-is-not-retrieving-the-expected-data