Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用希伯来语进行 SQL 查询时遇到问题:
"select ProductName From Products WHERE TypeOfProduct ='מעבד'"
我已经TypeOfProduct设置,它的值是 'מעבד',但查询返回null.
TypeOfProduct
null
如果我用数字或英文单词替换希伯来语单词,一切都会好起来的。
如何在 SQL 查询中使用希伯来语?
您应该在 where 子句中使用字符串之前的“N”前缀,即 N'מעבד' 来使用 Unicode...
select ProductName From Products WHERE TypeOfProduct = N'מעבד'
您还需要确保您的列是 typenvarchar而不是varchar.
nvarchar
varchar
如果不能使用nvarcharUnicode 字符串,则必须将数据库的排序规则从 更改LATIN为HEBREW.
LATIN
HEBREW