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.
我有一列名称,varchar(200)。此栏数据可以用希伯来文和英文填写。
我有对此数据库进行查询的代码,我希望可以选择对结果进行排序 - 首先是希伯来语,然后是英语 - 以及其他方式。
如何做呢?如果有的话……
这将对顶部带有希伯来字符的任何名称进行排序,并按希伯来顺序排列。其他名称将按英文顺序排序:
select * from YourTable order by case when name like '%[... all hebrew letters here ...]%' then name end collate Hebrew_CI_AS , name collate Latin1_General_CI_AS
在排序规则中,CI表示不区分大小写。AS表示口音敏感。
CI
AS