楼上的方法应该可以. 看这样能不能行: create table test_1(id varchar2,......) create table test_2(id varchar2,......) create table test_3(id varchar2,......) declare cursor cur is select id from test_1 union all select id from test_2 union all select id from; test_3 begin loop exit when cur%notfound; 统计语句 end loop; end; 需要添加统计字段,统计字段类型要一致才行,否则用楼上的方法才行.
看这样能不能行:
create table test_1(id varchar2,......)
create table test_2(id varchar2,......)
create table test_3(id varchar2,......)
declare
cursor cur is select id from test_1 union all select id from test_2 union all select id from;
test_3
begin
loop
exit when cur%notfound;
统计语句
end loop;
end;
需要添加统计字段,统计字段类型要一致才行,否则用楼上的方法才行.