想表达这个意思:if exists(Select CustID From PayAccount where CustID = iCustID and deptID= ideptID) then要如何写
定义一个游标
cursor rad_cursor is Select CustID From PayAccount where CustID = iCustID and deptID= ideptID;
然后看rad_cursor是否为空。
应该行,但我觉得是个笨办法,抛砖引玉!也请高手指教
cursor rad_cursor is Select CustID From PayAccount where CustID = iCustID and deptID= ideptID;
然后看rad_cursor是否为空。
应该行,但我觉得是个笨办法,抛砖引玉!也请高手指教
解决方案 »
- 安装了digger sql developer extension,不会使用找不到入口,郁闷啊。完全就是送分来了!!
- 一个使用游标的函数问题
- ORACLE 导出错误!3帖100
- 关于PL/SQL查询的问题
- 关于一条空值的sql处理
- 请问访问其他用户的表时可以不加用户名前缀吗?
- 请教一个关于触发器问题
- 外连接(+)影响速度吗?
- SQL> sqlldr userid=system/manager@ mingal control=input.ctl这错在哪?
- home/oracle/app/oradata/orcl/下的文件是什么文件,可以删除吗?
- 急!!!!!!!!请教各位一个和触发器有关的问题
- 物化视图的数据整理问题
num number;
begin
num:=0;
Select count(*) into num From PayAccount where CustID = iCustID and deptID= ideptID;
if num <> 0 then
......
select .............
exception when others then
..........
end;