[Dbix-class] Case sensitivity in column names using Oracle

Karl.Moens at marsh.com Karl.Moens at marsh.com
Tue Feb 14 11:31:12 CET 2006


Matt wrote:

> does anybody know if
> there are any databases that'll let you have foo, Foo and FOO all as 
column
> names on the same table?

At least MySQL does not allow you to have colums with names which only 
differ because of their case.

***QUOTE FROM THE MANUAL 5.0***

9.2.2. Identifier Case Sensitivity
In MySQL, databases correspond to directories within the data directory. 
Each table within a database corresponds to at least one file within the 
database directory (and possibly more, depending on the storage engine). 
Consequently, the case sensitivity of the underlying operating system 
determines the case sensitivity of database and table names. This means 
database and table names are case sensitive in most varieties of Unix, and 
not case sensitive in Windows. One notable exception is Mac OS X, which is 
Unix-based but uses a default filesystem type (HFS+) that is not case 
sensitive. However, Mac OS X also supports UFS volumes, which are case 
sensitive just as on any Unix. See Section 1.9.4, ?MySQL Extensions to 
Standard SQL?. The lower_case_table_names system variable also affects how 
the server handles identifier case sensitivity, as described later in this 
section. 
Note: Although database and table names are not case sensitive on some 
platforms, you should not refer to a given database or table using 
different cases within the same statement. The following statement would 
not work because it refers to a table both as my_table and as MY_TABLE: 
mysql> SELECT * FROM my_table WHERE MY_TABLE.col=1;

Column, index, stored routine, and trigger names are not case sensitive on 
any platform, nor are column aliases. 
***UNQUOTE FROM THE MANUAL 5.0***


Karl
aka CountZero on PerlMonks



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This message and any attachments are confidential. If you have received 
this message in error please delete it from your system. If you require 
any assistance please notify the sender. Thank You.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Dbix-class mailing list