Re: Empty Table

  • From: Steve Jelfs <steve@xxxxxxxxxxxxxx>
  • To: gogala@xxxxxxxxxxxxx
  • Date: Mon, 24 Jan 2005 08:07:04 +0000

Mladen Gogala wrote:
>>    
>>
>
>Oh, I can do one better. Here is a little script that will very quickly
>find all tables empty in a given schema.
>
>declare
>cmd varchar2(128):=3D'truncate table ';
>cursor csr is select table_name from user_tables;
>begin
>for c in csr loop
>  execute immediate cmd||c.table_name;
>end loop;
>dbms_output.put_line('All tables are empty!');
>end;
>/
>--=20
>Mladen Gogala
>Oracle DBA
>
>  
>

Mladen - you're a very wicked man!!   ;-)

Steve



--
//www.freelists.org/webpage/oracle-l

Other related posts: