Check that you’re not referring to a column alias inside a WHERE clause.
if the department table is aliased as dept, then it should be partment_id and not sup.department_id) To resolve the ORA-00904 error, check the following: We can check this as part of the solution below. It could also mean you’re using quotes when they aren’t needed. It’s caused by referring to a column that does not exist, or you are referring to an invalid alias in a SELECT statement. So, you ran an SQL statement and you got this error: Did you get an “ORA-00904: invalid identifier” error? Find out what caused the ORA-00904 error and how to resolve it in this article.