Category Archives: sql

PL/SQL Example: Count Table Rows in a Schema

  DECLARE cursor c1 IS SELECT tname FROM tab; tbl varchar2(64 CHAR); cnt NUMBER; BEGIN dbms_output.put_line(’Start… ‘); OPEN c1; loop BEGIN fetch c1 INTO tbl; exit WHEN c1%NOTFOUND; EXECUTE IMMEDIATE ‘select count(*) c from ‘ || tbl INTO cnt; dbms_output.put_line(’Table: … Continue reading

Posted in oracle, pl/sql | Tagged | Leave a comment