Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> is it possible in pl/sql?
CURSOR c_user_tables IS
SELECT table_name FROM user_tables ;
begin
FOR x IN c_user_tables LOOP
BEGIN
SELECT table_name INTO dummy FROM myTables WHERE table_name = x.Table_Name; sqlstmt := 'UPDATE myTables SET new_Rows = (select count(*) from ' || x.Table_Name|| ') WHERE Table_Name = ' || x.Table_Name||'; -- execute dynamic sql
Is there a way to get rid off the cursor looping. And
Possible?
TIA. Guang
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Feb 09 2005 - 16:15:42 CST