Case-sensitive object names

A tip/funny story from our colleague Grigoriy Novikov:

There was one project with which I was involved that required a lot of different tools used by a lot of developers with different fields of expertise. The Java developer group was working with Hibernate and they allowed the tool to generate tables. Later that day, they were confused about why the simple SELECT * FROM TABLE command did not work neither in SQL*Plus or in Oracle SQL Developer, even though the table was there in the list of objects. After an hour or two of fighting, they still were clueless.  The answer was simple. Hibernate generated case-sensitive table names by including the table names in double quotation marks (http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements008.htm). Several meetings later Dulcian took over the database design 🙂

Each time you use generators from third-party tools, you can use the query below to find objects that are case-sensitive:

select *  
  from all_objects
 where upper(object_name) <> object_name   
   and object_type not like 'JAVA%'
Tagged with: , , , ,
Posted in Code tips, Consulting, Resources, SQL

Leave a Reply

Your email address will not be published. Required fields are marked *

*