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.
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.
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.
Field (column) names are case-insensitive regardless.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With