Skip to content
Advertisement

single-row subquery returns more than one row in oracle in HR schema

and I found an error like the following :

Advertisement

Answer

Looks like there are “many” employees whose job_id = 'IT_PROG'. In that case, subquery returns “many rows” and your query results in an error.

It depends on what you want to do in such a case; for example, you might want to return rows for employees whose salary is lower than minimum salary for IT_PROG, so that would be

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement