Why do I have ORA-00904 even when the column is present?

Victor picture Victor · Apr 19, 2011 · Viewed 160.4k times · Source

I see an error while executing hibernate sql query.

java.sql.SQLException: ORA-00904: "table_name"."column_name": invalid identifier

When I open up the table in sqldeveloper, the column is present.

The error is only happening in PROD, not in DEV.

What should I check?

Answer

Jon Heller picture Jon Heller · Apr 20, 2011

It could be a case-sensitivity issue. Normally tables and columns are not case sensitive, but they will be if you use quotation marks. For example:

create table bad_design("goodLuckSelectingThisColumn" number);