SQL
Rules for Case-Sensitivity
#### Keywords and Function Names {#docs:sql:dialect:keywords_and_identifiers::keywords-and-function-names}  
SQL keywords and function names are case-insensitive in DuckDB.  
For example, the following two queries are equivalent:  
```matlab
select COS(Pi()) as CosineOfPi;
SELECT cos(pi()) AS CosineOfPi;
```  
| CosineOfPi |
|-----------:|
| -1.0       |  
#### Case-Sensitivity of Identifiers {#docs:sql:dialect:keywords_and_identifiers::case-sensitivity-of-identifiers}  
Identifiers in DuckDB are always case-insensitive, similarly to PostgreSQL.
However, unlike PostgreSQL (and some other major SQL implementations), DuckDB also treats quoted identifiers as case-insensitive.  
Despite treating identifiers in a case-insensitive manner, each character's case (uppercase/lowercase) is maintained as originally specified by the user even if a query uses different cases when referring to the identifier.
For example:  
```sql
CREATE TABLE tbl AS SELECT cos(pi()) AS CosineOfPi;
SELECT cosineofpi FROM tbl;
```  
| CosineOfPi |
|-----------:|
| -1.0       |  
To change this behavior, set the `preserve_identifier_case` [configuration option](#docs:configuration:overview::configuration-reference) to `false`.