Home Guides Glossary

What is collation and can I change it on my MS SQL database?

Collation controls the way string values are sorted. The default collation sorts alphabetically using the standard Latin character set. Other collations will sort in different orders. For example, a traditional Spanish collation places words beginning with "ch" at the end of a list of words beginning with "c."

It is not necessary to change the default collation to use non-Latin characters. All shared MS SQL databases support Unicode characters, allowing the storage of a variety of alphabets.

Modifying collation settings is an advanced database task and should only be performed by experienced database developers. If you determine it is necessary to change your collation, we recommend modifying it at the table or column level. Making this change at the database level disables some Hosting Control Panel functionality, including the installation and removal of ASP Schema objects. Modifying at the table or column level avoids the majority of known compatibility issues with non-standard collation settings.

The following T-SQL sample illustrates how to set the collation at the column level:

CREATE TABLE [dbo].[CollationTest](
[keyColumn] [bigint] NULL,
[strColumn] [varchar](max) COLLATE Traditional_Spanish_CI_AI NULL
) ON [PRIMARY]

Domain Registration

Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. We have everything you need to get online with your new domain.

Website Builder

Build an amazing website in just under an hour with Website Builder. Take advantage of designs created just for your industry and then customize them to reflect your one-of-a-kind idea.

Website Security

Protect your website and keep customers safe. Your comprehensive Website Security solution. Get peace of mind by securing your websites.

cPanel Hosting

Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with a SSL Certificate
Copyright © 2005 - 2024.  All rights reserved.  Privacy Policy