create or replace procedure aaa ( vi_num in integer,
vd_time1 in date, vd_time2 in date)
is
i integer ;
begin
for i in 0..100 loop
select min(a),max(a) from record where number= vi_num and time
between vd_time1 and vd_time2;
end loop;
end;
vd_time1 in date, vd_time2 in date)
is
i integer ;
begin
for i in 0..100 loop
select min(a),max(a) from record where number= vi_num and time
between vd_time1 and vd_time2;
end loop;
end;
解决方案 »
- oracle 10g 如何更改端口号?
- oracle怎么批量处理insertsql?
- 将文本文件导入oracle的问题
- 主键有何好处,复合主键有何好处?
- 新建数据库后,导入 备份的数据,导入完成后 报告oracle 942 错误! 请问这会有什么影响?
- 求个在oracle sql plus 里可运行的语句
- 急!!!oracle7.3导入数据出错,请帮忙,谢谢!
- 怎么找不到我的问题
- 建库时文件大小的分配?
- 如何使用archivelog模式下自動生成的文件對數據庫進行恢復﹖
- 请问哪里有免费下载《ORACLE8 PL/SQL程序设计》这本书的?(虽然有很多网站提供下载,可是都无法正确下载)
- 集思广益
v_min record.a%type;
v_max record.a%type;
type t_user is varray(101) of number;
v_user t_user:=t_user();
begin
for i in 1..100 loop
select min(a),max(a) into v_min,v_max from record where number=i and time between time1 and time2;
dbms_output.put_line(v_min||v_max);
end loop;
end;
/以上要输入time1与time2两个值
beckhambobo,你给的代码我输入到sql*plus中提示 未知命令——其余行忽略这样的错误?
能帮我分析一下为什么吗?谢谢!