How can I findout what's my MSSQL server collation?

Is there a SQL I can execute to find out?

  • Set based way to classify rows based on dates fitting inside a rolling two hour window
  • Filter a when passing a parameter and return all when not passing a parameter
  • MS SQL copy data from another table by rows
  • Search for “whole word match” with SQL Server LIKE pattern
  • Get certain weekday within a week given by a DATETIME
  • Create SQL Server 2008 Backup from 2008 R2
  • 3 Solutions collect form web for “How can I findout what's my MSSQL server collation?”

    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

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.