Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> stored procedure
I need to make a stored procedures that deallocates the unused space for
all tables of a given schema. I've tried to do something like this, but
it doesn't work:
create procedure proc as
tab_name varchar2;
beegin
declare cursor c1 is
select table_name from all_tables where owner='myowner';
open c1;
loop
fetch c1 into tab_name;
dbms_sql.execute('ALTER TABLE ' || table_name || ' DEALLOCATE UNUSED;');
end loop; close c1; end proc;
Where is the error?
Thank you to anyone will help me.
Alessandro Benati
Received on Tue Sep 14 1999 - 16:11:12 CDT
![]() |
![]() |