相当于记录集,用于查询:
declare
cursor t_sor is
select * from table;
begin
for v_sor in t_sor loop
dbms_output.put_line(v_sor.col1,...);
end loop;
end;
/
declare
cursor t_sor is
select * from table;
begin
for v_sor in t_sor loop
dbms_output.put_line(v_sor.col1,...);
end loop;
end;
/
解决方案 »
- 存储过程里的DML语句是自动提交的吗
- 关于更新触发器的问题
- 查询外部表时速度很慢,为什么?
- 服务器字符集是WE8ISO8859P1,属于单字符集,一个汉字占两个字节。我的oracle版本是8.1.7或7.3.4。有没有一个能够完全转换WE8ISO8859P1的父
- 大量数据从A表转移到B表的存储过程,使用事务。
- oracle语句怎么写查询语句相关的
- 有没有关于Oracle初学的书籍啊,请各位大哥不吝啬告诉小弟!
- 感谢大虾给指点一下-----为什么不能启动数据库?net8?console为何有时进不去?
- 在线等待:inner join问题,各位DX帮忙!!
- 关于msflxgrd.ocx的使用
- 快照无法正常刷新?
- 如何在Oracle中存储图像?
declare
v_col1 table_name.col1%type;
begin
select col1 into v_col1 from table_name where rownum<=1;
if sql%notfound then
dbms_output.put_line('没有记录');
else
dbms_output.put_line('有记录');
end if;
end;
/