1
根據https://msdn.microsoft.com/en-us/library/ms184391.aspxSQL分頁訂購
下選擇訂單位置表的不同取決於整理,爲何以及如何exactilly確實西班牙整理提出「恰帕斯」作爲最後一排?
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