根据https://msdn.microsoft.com/en-us/library/ms184391.aspx
以下选择根据整理顺序对Locations表进行不同的排序,为什么以及如何将西班牙语整理将'Chiapas'作为最后一行?
CREATE TABLE Locations
(Place varchar(15) NOT NULL);
GO
INSERT Locations(Place) VALUES ('Chiapas'),('Colima')
, ('Cinco Rios'), ('California');
GO
--Apply an typical collation
SELECT Place FROM Locations
ORDER BY Place
COLLATE Latin1_General_CS_AS_KS_WS ASC;
GO
-- Apply a Spanish collation
SELECT Place FROM Locations
ORDER BY Place
COLLATE Traditional_Spanish_ci_ai ASC;
GO
首次查询(标准整理):
Place
-------------
California
Chiapas
Cinco Rios
Colima
第二次查询(西班牙语整理):
Place
-------------
California
Cinco Rios
Colima
Chiapas