Wednesday, July 16, 2008

Changing Case Sensitivity in SQL Server 2005

Here's a great "how-to" on changing your existing db to case insensitive

The bottom line is, create your db's as case insensitive using the default sql server collation settings (for US) of SQL_Latin1_General_CP1_CI_AS.

To find your current case sensitivity using the following

SELECT DATABASEPROPERTYEX(db_name, 'Collation')

For example

SELECT DATABASEPROPERTYEX('AdventureWorks','Collation')

2 comments:

Unknown said...

The db_name must be in quotes

SELECT DATABASEPROPERTYEX('db_name', 'Collation')

Todd Newell said...

Thanks jhk. I added an example.