This is the first in a series of blurbs on common Oracle errors. Enjoy!
Most people get ORA-00904 because they forgot to put quotes around a literal string in their SQL.
[code language=”sql”]SQL> select foo from dual;
select foo from dual
ERROR at line 1:
ORA-00904: "FOO": invalid identifier
SQL> select ‘foo’ from dual;
Other causes of this error may include:
- No privileges on the object in question
- the object or column is misspelled
- There is no private or public synonym, so the object must be called using a fully-qualified name (SCOTT.EMP vs. EMP)