Is SQL SELECT case sensitive in Databricks?

BRIEF OVERVIEW

In Databricks, the SQL SELECT statement is not case-sensitive when it comes to column names. This means that you can write column names in uppercase, lowercase, or a combination of both and still retrieve the same results.

FAQs

Q: Does case sensitivity apply to table names?

A: Yes, table names are case-sensitive in Databricks. You must use the exact casing specified when creating or referencing tables.

Q: Are string comparisons case-sensitive?

A: By default, string comparisons are case-insensitive in most databases including Databricks. However, this behavior can be changed by modifying the collation settings for specific columns or queries.

Q: Can I make my SQL queries case-sensitive?

A: Yes, you can make your SQL queries case-sensitive by using binary collations like “Latin1_General_BIN” instead of the default collations. This will treat all characters as distinct based on their binary representation rather than their linguistic rules.

BOTTOM LINE: In Databricks, while column names are not case-sensitive in a SQL SELECT statement,
table names are and you have control over whether string comparisons should be considered as
either insensitive or sensitive through appropriate collation settings.