CREATE OR REPLACE PACKAGE 你的包名
AS
TYPE myrctype IS REF CURSOR; procedure sms_GetSendInfo(p_rc OUT myrctype);
END;
/CREATE OR REPLACE PACKAGE BODY 你的包名
AS
procedure sms_GetSendInfo (p_rc OUT myrctype)
as
minautoid int default 0;
sqlstr varchar2(100);
begin
select max(autoid) into minautoid from sms_interface;
sqlstr:='select autoid ,mobile,mobilepayed,servicetype,feetype,feevalue,moflag,content,spnumber from sms_interface where autoid =:minautoid';
OPEN p_rc FOR sqlstr USING minautoid;
insert into sms_interface_history select * from sms_interface where autoid=minautoid;
delete sms_interface where autoid=minautoid;
commit;
end;
end;
/
AS
TYPE myrctype IS REF CURSOR; procedure sms_GetSendInfo(p_rc OUT myrctype);
END;
/CREATE OR REPLACE PACKAGE BODY 你的包名
AS
procedure sms_GetSendInfo (p_rc OUT myrctype)
as
minautoid int default 0;
sqlstr varchar2(100);
begin
select max(autoid) into minautoid from sms_interface;
sqlstr:='select autoid ,mobile,mobilepayed,servicetype,feetype,feevalue,moflag,content,spnumber from sms_interface where autoid =:minautoid';
OPEN p_rc FOR sqlstr USING minautoid;
insert into sms_interface_history select * from sms_interface where autoid=minautoid;
delete sms_interface where autoid=minautoid;
commit;
end;
end;
/
解决方案 »
- Oracle恢复问题--急
- insert into遇到的问题
- TOAD FOR ORACLE 安装后的配置!
- 求一个把表记录导入到文本文件,并且带‘|’分隔符。(MySQL)
- 想得到某个表的某个字段的最大值,写了个函数,帮忙看看错在哪里?
- 字段后面跟(+)是什么意思?
- view从sqlserver移植到oracle
- OracleOraHome81ManagementServer服务无法启动!!!
- Oracle9i安装磁盘空间不够的问题!
- 问下oracle 存储过程 自定义类型的问题
- 请问,我再一个台机器上做得oracle数据库如何移植到另外一台机器上?
- 如何显示保存在oracle中的类型为BLOB的JPG图片? 急!!!
as
type t_rc is ref cursor;
end;
/
create or replace procedure sms_GetSendInfo(p_rc out test_pack.t_rc)
as
minautoid number:=0;
begin
select min(autoid) into minautoid from sms_interface;
open p_rc for
select autoid ,mobile,mobilepayed,servicetype,feetype,feevalue,moflag,content,spnumber from sms_interface where autoid = minautoid;insert into sms_interface_history select * from sms_interface where autoid=minautoid;
delete sms_interface where autoid=minautoid;
commit;
exception
when others then
rollback;
end;
/