ORA
-01422 exact fetch returns more than one value
Ø Exact
fetch returns more than one value occurs when the SELECT INTO statement return
more than one values
Example:
Output:
p_deptno = 10
ERROR;
ORA -01422 exact fetch returns more
than one value
Solution:
Ø Above
select into statement return more than rows because dept = 10 had multiple
employees in the emp table.
Ø To
overcome this, we should use cursor.
Below code can return one value,
here ,Unique name of the employee return exact one row.
No comments:
Post a Comment