Search code examples
databaseoracle-databaseoracle11gcase-sensitive

How to make oracle installation case sensitive?


I have oracle express installation, and by default it is case insensitive ( table creation/ keys name ). I want to change it to case sensitive. Is there a configuration to do so?


Solution

  • There is no setting, no.

    In any version of Oracle, however, you can use case-sensitive identifiers by enclosing them in double-quotes.

    create table "CamelCase" (
      "ColumnName1" integer
    );
    

    will create a table CamelCase which is case-sensitive and a column ColumnName1 that is case sensitive. In order to use the column, though, every reference will need to be surrounded in double-quotes

    SELECT "ColumnName1"
      FROM "CamelCase"
    

    would work. However

    SELECT ColumnName1
      FROM CamelCase
    

    would not.

    Using case-sensitive identifiers is generally a really bad idea so I would strongly suggest that you don't do so. It is an option though.