Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there benefits to a case sensitive database?

Tags:

We have just 'migrated' an SQL Server 2005 database from DEVEL into TEST. Somehow during the migration process the DB was changed from case insensitive to sensitive - so most SQL queries broke spectacularly.

What I would like to know, is - are there any clear benefits to having a case sensitive schema?

NOTE: By this I mean table names, column names, stored proc names etc. I am NOT referring to the actually data being stored in the tables.

At first inspection, I cannot find a valid reason that offers benefits over case insensitivity.

like image 762
Jack Avatar asked Oct 22 '08 02:10

Jack


People also ask

Does SQL care about case-sensitivity?

The SQL keywords (SELECT, FROM, WHERE, etc.) are case-insensitive, yet they are frequently expressed in all capitals. Table and column names are case-sensitive in some settings.

Are databases case sensitive?

Although database, table, and trigger names are not case-sensitive on some platforms, you should not refer to one of these using different cases within the same statement.

Should you treat database table and column names as case sensitive or case-insensitive?

Field (column) names are case-insensitive regardless.

What is case-sensitivity in SQL?

SQL Case sensitivity is to use the query statements and the keywords tables and columns by specifying them in capital or small letters of alphabets. SQL keywords are by default set to case insensitive, which means that the keywords are allowed to be used in lower or upper case.


1 Answers

I just found out why WE make it case sensitive. It is to ensure that when we deploy it on the client site, our DB works regardless whether the client's SQL Server is set up case sensitive or not.

That is one answer I wasn't expecting.

like image 68
Jack Avatar answered Oct 01 '22 01:10

Jack