How can I determine which code page a particular collation on SQL Server uses?
Single-byte code pages are definitions of the characters mapped to each of the 256 bit patterns possible in a byte. Code pages define bit patterns for uppercase and lowercase characters, digits, symbols, and special characters such as !, @, #, or % .
Code page 1252 (ISO character set) is the default character set. It is also known as the ISO 8859-1, Latin 1, or ANSI character set. It is compatible with the ANSI characters used by the Microsoft® Windows NT® and Microsoft Windows® operating systems.
The SQL_Latin1_General_CP1_CI_AS collation is a SQL collation and the rules around sorting data for unicode and non-unicode data are different. The Latin1_General_CI_AS collation is a Windows collation and the rules around sorting unicode and non-unicode data are the same.
Database character set for Microsoft SQL Server is referred to as code page or collation. When creating a database, the collation type for the database can be specified.
The COLLATIONPROPERTY
function can be used to get the code page. Here is the code page for every possible collation:
SELECT [Name], [Description], [CodePage] = COLLATIONPROPERTY([Name], 'CodePage')
FROM ::fn_helpcollations()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With