Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> PL/SQL Problem
DECLARE
CURSOR get_table_sizes_cur
IS
SELECT table_name
FROM dba_tables
WHERE table_name = 'TRADE_HISTORY';
row_count NUMBER;
tab_name get_table_sizes_cur%ROWTYPE;
BEGIN
FOR tab_name IN get_table_sizes_cur
LOOP
SELECT count(*)
INTO row_count
FROM tab_name;
dbms_output.put_line(row_count);
EXIT WHEN get_table_sizes_cur%NOTFOUND;
END LOOP;
END;
/
How would I get the SELECT to read from tab_name rather than from a particular table?
-- Christopher R. Spence OCP, MCP, MCSE, A+, RAPTOR, CNA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri Oct 20 2000 - 11:22:45 CDT
![]() |
![]() |