【发布时间】:2012-12-11 07:42:46
【问题描述】:
我想检查光标是否只有一行。 并返回这个,
--请看我的问题在程序里面吗?
CREATE OR REPLACE PROCEDURE GetInterestRate( p_id IN NUMBER DEFAULT NULL,
RC1 IN OUT SYS_REFCURSOR
)
....
begin
open rc1 for select * from interestRatesTable i join parametersInterest p on
i.interestName = p.Name
where i.idinterest = p_id
and p.Active ='A';
-- I would like to check if cursor have only one row.
--- if it has zero row, no result I got to raise an error
--- if it has more than one row, I got to raise to many interest rates!
-- how can I do this?
end;
【问题讨论】:
-
和java有什么关系?
-
我认为java开发人员应该熟悉这个案例。我只是为了礼貌而删除......
标签: sql oracle stored-procedures plsql