table and column name case sensitivity

I ran into some issues accessing Oracle tables via ODBC. It turns out that sqlplus automatically uppercases all the table and column names when you create a table. The table can be accessed fine with sqlplus which transparently handles everything in uppercase. However, unixODBC is case sensitive by default. So I just have to be aware of the difference and specify everything in uppercase.

You can quote the table name in Oracle to prevent this behaviour, but it is not recommended.

After investigating some more, it turns out that each databases handles it differently.

MySQL is case sensitive on Linux:

http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

PostgreSQL lowercases table and column names:

http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

Leave a Reply

You must be logged in to post a comment.