Export (0) Print
Expand All
Expand Minimize

sp_helpsort (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Displays the sort order and character set for the instance of SQL Server.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

Topic link icon Transact-SQL Syntax Conventions

sp_helpsort

0 (success) or 1 (failure)

Returns server default collation.

If an instance of SQL Server is installed with a collation specified to be compatible with an earlier installation of SQL Server, sp_helpsort returns blank results. When this behavior occurs, you can determine the collation by querying the SERVERPROPERTY object, such as: SELECT SERVERPROPERTY ('Collation');.

Requires membership in the public role.

The following example displays the name of the default sort order of the server, its character set, and a table of its primary sort values.

sp_helpsort;

Here is the result set.

Server default collation

------------------------

Latin1-General, case-sensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 51 on Code Page 1252 for non-Unicode Data.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft