OracleORA-00904
ORA-00904: Invalid Identifier
ORA-00904 is thrown when Oracle cannot resolve a column name or alias in the query. Oracle stores identifiers in uppercase unless they were created with double-quote delimiters.
Example Query
SELECT firstName FROM employees; -- Fails if the column was created as FIRSTNAME (uppercase)
Common Causes
- 1Column name is lowercase but was created without double quotes (stored as uppercase)
- 2Typo in the column or alias name
- 3Referencing a SELECT alias in the WHERE clause (not allowed in Oracle)
How to Fix It
Check the column names with DESC table_name. Use uppercase identifiers to match Oracle's default storage. If the column was created with quotes, reference it as "firstName" (with double quotes, exact case).
Need a reliable database?
Try Supabase — free PostgreSQL with a generous free tier. No credit card required.
Got a query causing this error?
Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.
Analyze My Query →