create or replace procedure CREATE_TEST is
demo table %rowtype;
CURSOR demo IS select * from table a where a.name = ?
begin
open demo ;
fetch demo into table ;
EXIT WHEN demo %NOTFOUND;如果有一条记录那么往下执行。
得到这条记录的一个字段为条件。
如果没有就返回。select * from table a where a.type = table.type;然后自循环这条语句。一直到树的最下端。
解决方案 »
- oracle每天定时将查询结果插入指定表,如何实现?
- 我想做个能用到数据库的软件!大家给个意见
- 请教,在oracle 里误删除了表里的数据,而且已经提交?如何恢复?
- 关于TABLESPACE
- 急急急,高分求救,高手帮忙
- Oracle备份时 首选身份证明无效 该怎么做?
- 在sqlplus里执行存储过程出现字符缓冲区太小,怎么解决?哪位帮帮忙
- 難題!!!!(在線等)
- 请问如何将oracle9i导出文件(dmp)导入到8i中?
- 百分相赠:ORACLE-12592 求解
- oracle9i中存储过程执行的怪问题
- 高分急等:pb游标错误(Error parsing command: .............)
demo table %rowtype;
CURSOR demo IS select * from table a where a.name = ?
begin
open demo ;
loop
fetch demo into table ;
EXIT WHEN demo%NOTFOUND;
/*添加代码*/
end loop;end;