Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    9

    Arrow Unanswered: how to findout empty tables in a user

    Hi

    in my user i am having 15 tables in this only 5 tables consists of rows(means data thats is 10 or 15 rows of data) . remaining are empty tables...

    how to findout these tables...

    Thanks in Advance

    Chiranjeevi

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: how to findout empty tables in a user

    PHP Code:
    declare
      
    c integer;
    begin
      
    for r in (select table_name t from user_tablesloop
        execute immediate 
    'select count(*) from '||r.t||' where rownum=1' into c;
        if 
    0 then
          dbms_output
    .put_line(r.t);
        
    end if;
      
    end loop;
    end

  3. #3
    Join Date
    Jan 2004
    Posts
    9

    Re: how to findout empty tables in a user

    Procedure is executing very nicely...
    Thank you very much
    Chiranjeevi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •