ORA-01422: exact fetch returns more than requested

神奇的错误,困扰了我一个下午。

问题描述:明明只有一行记录,结果是报了多条记录的错误。令我百思不得其解,

检查无数遍sql没有问题。

解决方法:因为起的变量名字与列名一致。

select r.stu_type_cd INTO stu_type_cd from r.stu r where r.stu_idstu_id

这里出现了两个重名的地方:r.stu_type_cd 与stu_type_cd ;;;;r.stu_id 与 stu_id; 

 

posted on 2016-11-11 17:36  学而不思则玩  阅读(8493)  评论(0编辑  收藏  举报