What is error single row subquery returns more than one row?

What is error single row subquery returns more than one row?

The ORA-01427 is a straightforward query error in Oracle. The cause of the error is a subquery returning more than one row of information. This error in multi-row returns on the subquery originates from an outer query failing to use appropriate, designated keywords to specify values for comparison in the subquery.

What causes many rows exception?

This is where the error is being thrown. When an ORA-01422 is triggered, your SELECT INTO statement is retrieving multiple rows of data or none at all. If it is returning multiple, the predefined exception TOO_MANY_ROWS will be raised, and for no returns the PL/SQL will raise NO_DATA_FOUND.

Which exception is raised if no rows are selected from SELECT statement?

PL/SQL predefines some common Oracle errors as exceptions. For example, PL/SQL raises the predefined exception NO_DATA_FOUND if a SELECT INTO statement returns no rows. You can use the pragma EXCEPTION_INIT to associate exception names with other Oracle error codes that you can anticipate.

Is there more than one row for the sobject error?

List has more than 1 row for assignment to SObject error, need help please. Welcome to Support! Search for an answer or ask a question of the zone or Customer Support. Need help? Dismiss Don’t have an account? Don’t have an account? List has more than 1 row for assignment to SObject error, need help please.

What causes subquery to return more than one row?

This error is caused by the subquery that must return at most one row but returns multiple rows eventually. mysql> select * from items where id = (select item_id from orders); If the subquery returns just one row, the above query will work without errors. If it returns more than one row, we will see error 1242.

Why does select statement return more than one row?

For example: This is because the subquery in the SELECT statement returned more than one row for the predicate department_id, which does not comply with a singular value limited operator, the equal =. Consequently, the statement fails to continue and then throw ORA-01427 to notify developers.

Why does Ora 01427 return more than one row?

ORA-01427: single-row subquery returns more than one row This is because the subquery in the SELECT statement returned more than one row for the predicate department_id, which does not comply with a singular value limited operator, the equal =. Consequently, the statement fails to continue and then throw ORA-01427 to notify developers.