Showing posts with label collation. Show all posts
Showing posts with label collation. Show all posts

Tuesday, 28 February 2012

Microsoft SQL server collation issue.

To chech which collation is used.

SELECT DATABASEPROPERTYEX('pipe1', 'Collation') SQLCollation;
//pipe1 equals to the database name

SELECT name, collation_name
FROM sys.databases
WHERE name = 'pipe1'
//pipe1 equals to the database name

These two commands give the same output.

To check the collation which are supported in server.
SELECT * FROM ::fn_helpcollations()


To change database collation
ALTER DATABASE databasename
COLLATE SQL_Latin1_General_CP1_CI_AS