可以在该语法之前,先利用select count(*) from 查看数据库中是否存在该记录,如果存在,再利用select...into...
4.在存储过程中,别名不能和字段名称相同,否则虽然编译可以通过,但在运行阶段会报错
select keynode into kn from APPFOUNDATION where appid=aid and foundationid=fid;-- 正确运行 select af.keynode into kn from APPFOUNDATION af whereaf.appid=appidandaf.foundationid=foundationid;-- 运行阶段报错,提示 ORA-01422:exact fetchreturns more than requested numberof rows