Wednesday, August 13, 2014

How to view collation of server, database and columns

Below are the commands to view server collation, database collation and collations of columns


To view server level collation setting

SELECT CONVERT (varchar, SERVERPROPERTY('collation'));     

To view database level collation

SELECT name, collation_name FROM sys.databases;


To view column level collation

SELECT name, collation_name FROM sys.columns
where object_id in (select object_id from sys.objects where TYPE='U' and name = 'Client')

 

No comments: