1.

What Is Collation In Sql Server?

Answer»

There are the certain set of rules which WOULD decide how data needs to be sorted and compared in a database. These rules can be referred to as Collation. Example – Character data is sorted using rules that defines the right character sequence, with an option for specifying case sensitivity, character width etc. Collation is predefined in SQL server, which would decide how data in SQL server are stored and retrieved.

There are various collations that EXIST in SQL server, but 2 are MAIN:

  • SQL_Latin1_General_CP1_CI_AS
  • SQL_Latin1_General_CP1_CI_AS

Where CI is case insensitive and CS is case sensitive. So, by DEFAULT collation is case insensitive, thus all database in it is also case-insensitive.

There are the certain set of rules which would decide how data needs to be sorted and compared in a database. These rules can be referred to as Collation. Example – Character data is sorted using rules that defines the right character sequence, with an option for specifying case sensitivity, character width etc. Collation is predefined in SQL server, which would decide how data in SQL server are stored and retrieved.

There are various collations that exist in SQL server, but 2 are main:

Where CI is case insensitive and CS is case sensitive. So, by default collation is case insensitive, thus all database in it is also case-insensitive.



Discussion

No Comment Found