17,377
社区成员
发帖
与我相关
我的任务
分享
create or replace procedure pro_count is
cursor cu_tname is
select table_name from user_tables;
v_tname varchar2(50);
c number;
begin
open cu_tname;
loop
fetch cu_tname
into v_tname;
exit when cu_tname%notfound;
select bytes/1024/1024
into c
from dba_segments
where segment_name = v_tname;
dbms_output.put_line(c);
end loop;
close cu_tname;
end;