create or replace procedure p_name
as
cursor cur_name is
select * from other_table;
begin
for cur in cur_name loop
if cur.字段='指定值' then
insert into this_table values(cur.字段,...);
end if;
end loop;
end;
/
as
cursor cur_name is
select * from other_table;
begin
for cur in cur_name loop
if cur.字段='指定值' then
insert into this_table values(cur.字段,...);
end if;
end loop;
end;
/
create or replace procedure p_name
as
begin
for cur_name in (select * from other_table)
loop
if cur.字段='指定值' then
insert into this_table values(cur.字段,...);
end if;
end loop;
end;
/
as
num number;
begin
select count(1) into num from table where nvl2(p1,col1,1)=nvl(p1,1) and nvl2(p2,col2,1)=nvl(p1,1) and ....;
end;
/
请问skystar99047(天星)的怎样理解?
建一游标,名cur_name,cur是什么?
haifeng1012(海风)的cur_name是什么?和cur.字段相等吗?还有那个条件不止一条,有的要2,3条
请您加注释说明,感激不禁!