SQL Server is, by default, case insensitive; however, it is possible to create a case-sensitive SQL Server database and even to make specific table columns case sensitive. The way to determine if a database or database object is to check its "COLLATION" property and look for "CI" or "CS" in the result.
CI= Case Insensitive
CS= Case Sensitive
A common result is:
CIindicates that the server is case insensitive.
Again, this will output something like:
SELECT collation_name FROM sys.databases WHERE name = 'your_database_name'
WHEREclause and include
SELECT name, collation_name FROM sys.databases
SELECT COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'your_table_name' AND CHARACTER_SET_NAME IS NOT NULL
Another command for checking the case-sensitivity and other properties of the database server is:
This will return something like:
Latin1-General, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 52 on Code Page 1252 for non-Unicode Data
Finally, to see all collations supported by your SQL Server installation, run this:
SELECT name, description FROM sys.fn_helpcollations()
The result will be something like this:
Nat Dunn founded Webucator in 2003 to combine his passion for web development with his business expertise and to help companies benefit from both.