利用游標(cursor)
create or replace procedure p10
is
table_name varchar2(10);
cursor cur1 is
select table_name from user_tables;
begin
open cur1;
loop
fetch cur1 into table_name;
exit when cur1%NOTFOUND;
dbms_stats.gather_table_stats('user1',table_name);
dbms_output.put_line('susess'||table_name);
end loop;
close cur1;
end;
set serveroutput on;
exec p10;
已編譯 PROCEDURE p10
匿名區塊已完成
susessT
susessT1
susessT2
文章標籤
全站熱搜
