:::: MENU ::::

Change Collation of a databse through T-SQL

  • Jul 20 / 2009
  • 0
Data Modeling and Database Design, dbDigger, SQL Server Collations, T-SQL Interview Questions

Change Collation of a databse through T-SQL

In a previous post i discussed that how to get list of SQL Server collations. Now we have to see that how to change collation o a database.
Before completion of this task make sure that you have no column value that depends upon collation settings.
After that get name of required collation that you are going to implement. List of collations can be retrieved from our previous article. In this example we will change collation of database AdventureWorks to ‘SQL_Latin1_General_CP1_CI_AS’

Alter Database AdventureWorks  
 Collate SQL_Latin1_General_CP1_CI_AS  

After that a success message will appear and collation is now changed.

Consult us to explore the Databases. Contact us