select * from 表 order by 列 COLLATE Chinese_PRC_CS_AS_KS_WS 试试
declare @t table(姓名 varchar(10)) insert into @t select '宋' insert into @t select '阿' insert into @t select '不' insert into @t select '没' insert into @t select '年' insert into @t select '日'select * from @t order by 姓名 collate Chinese_PRC_CI_AS --原来是按拼音
declare @t table(col nvarchar(2)) insert @t select N'中' union all select N'国' union all select N'便' select * from @t order by col collate Chinese_PRC_CS_AS_KS_WS /* col ---- 便 国 中 */ 多音字怎么办??
declare @t table(姓名 varchar(10)) insert into @t select '王' insert into @t select '张' insert into @t select '李'select * from @t order by 姓名 collate Chinese_PRC_CI_AS
试试
insert into @t select '宋'
insert into @t select '阿'
insert into @t select '不'
insert into @t select '没'
insert into @t select '年'
insert into @t select '日'select * from @t order by 姓名 collate Chinese_PRC_CI_AS
--原来是按拼音
比如 张三,李四,王五等,查询的结果是:
李(l)四,王五(w),张三(z)...
insert @t select N'中'
union all select N'国'
union all select N'便'
select * from @t order by col collate Chinese_PRC_CS_AS_KS_WS
/*
col
----
便
国
中
*/
多音字怎么办??
insert into @t select '王'
insert into @t select '张'
insert into @t select '李'select * from @t order by 姓名 collate Chinese_PRC_CI_AS