How can I findout what's my MSSQL server collation?
Is there a SQL I ca开发者_JAVA技巧n execute to find out?
The server default collation:
select serverproperty('collation')
Which is the same as
select databasepropertyex('master','collation')
Check SERVERPROPERTY in Books Online for other information you can get about the server (instance).
SELECT DATABASEPROPERTYEX('AdventureWorks', 'Collation') SQLCollation;
Just substitute your DB name for 'AdventureWorks'
. Or use DB_NAME
:
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Collation') SQLCollation;
This is the official doc given by MS, hope it helps. http://msdn.microsoft.com/en-us/library/hh230914.aspx#TsqlProcedure
精彩评论