create or replace procedure Getmax(d1 in date,d2 in date, max out number) is
temp1 number;
d3 date;
cursor c1 is
select time,shuiwei from sys.kushui;
begin
open c1;
loop
fetch c1
into d3,temp1;
exit when c1%notfound;
dbms_output.put_line( 'kushui'
||temp1);
end loop;
close c1;
end Getmax;
测试的时候 发现运行错误,该怎么办呢
temp1 number;
d3 date;
cursor c1 is
select time,shuiwei from sys.kushui;
begin
open c1;
loop
fetch c1
into d3,temp1;
exit when c1%notfound;
dbms_output.put_line( 'kushui'
||temp1);
end loop;
close c1;
end Getmax;
测试的时候 发现运行错误,该怎么办呢
解决方案 »
- 客户端连接oracle为什么无法正常生成SQL-TRACE
- 一个Sql语句执行效率的问题
- oracle 关系数据库和ldap轻量目录访问协议数据库的区别
- ORACLE的SQL语句能不能实现以下功能?
- oracle10g isqlplus em刚刚安装好的时候可以访问,平时用的少就关掉了服务(我抓图记下了原来的服务状态),为何今天我打开服务后无法打开
- bbs里 每个帖子的属性会有哪些?
- oracle安装不了了,大侠们快帮帮忙啊
- oracle 问题
- 如何把SQL2000中的数据库导入到orcale中???
- 怎样用oracle8i编写.sql脚本啊?还是用其他的工具?具体怎样操作?谢谢!!
- 在 ORACLE中如何执行存储过程
- windows下面的dbconsole启动不起来,如何搞啊,附图片!
create or replace procedure Getmax
(d1 in date,d2 in date)
is
temp1 number;
d3 date;
rere varchar(20);
cursor c1 is
select time,shuiwei from sys.kushui;
begin
open c1;
loop
fetch c1 into d3,temp1;
exit when c1%notfound;
rere:=rere ||'kushui'||temp1;
end loop;
close c1;
dbms_output.put_line(rere);
end Getmax;
create or replace procedure Getmax(d1 in date,
d2 in date,
max11 out number) is
temp1 number;
d3 date;
-- max11 number;
cursor c1 is
select time,shuiwei from sys.kushui;
begin
max11 := 0;
open c1;
loop
fetch c1
into d3, temp1;
exit when c1%notfound;
dbms_output.put_line('kushui ' || temp1);
max11 := max11 + 1;
end loop;
close c1;end Getmax;
[/code]
create or replace procedure Getmax(d1 in date,d2 in date, max out number) is
cursor c1 is
select time,shuiwei from sys.kushui;
e c1%rowtype;
begin
if not c1%ISOPEN then
open c1;
end if;
fetch c1 into e;
while c1%found loop
dbms_output.put_line( 'kushui '||e.shuiwei);
fetch c1 into e;
end loop;
close c1;
end;