The rules around this are explained in the HSQLDB documentation :
When a database object is created with one of the CREATE statements or renamed to the ALTER statement, if the name is enclosed in double quotes, the exact name is used as the normal form. But if it is not enclosed in double quotes, the name is converted to upper case and this version in upper case is stored in the database as a regular form.
Case sensitivity rules for identifiers can be simply described as follows: as follows:
- all parts of SQL statements are converted to uppercase before processing, except for identifiers in double quotes and strings in one Quotation
- both unquoted and double quotes are then treated as case sensitive
- most database engines follow the same rule, with the exception, in some respects, of MySQL and MS SQL Server.
AFAIK this behavior cannot be disabled. (It is worth noting that standard SQL is not case sensitive when quoted identifiers are not used.) But, as mentioned above, a lowercase identifier can be specified by enclosing in quotation marks, for example:
CREATE TABLE "lowercasetablename" ("lowercasecolname" INT); SELECT "lowercasecolname" FROM "lowercasetablename";
source share