title: Pls-00364: loop index variable 'j' use is invalid
body: <p>I'm trying to get count of every table in my schema.</p>
  
  <pre><code>SET serveroutput ON;
  BEGIN
  FOR I IN (SELECT TABLE_NAME FROM USER_TABLES) LOOP
  FOR J IN (SELECT COUNT(1) CNT FROM I.TABLE_NAME) LOOP
  DBMS_OUTPUT.PUT_LINE(I.TABLE_NAME||'&gt;&gt;'||J.CNT);
  END LOOP;
  END LOOP;
  END;
  /
  </code></pre>
  
  <p>But i'm getting error like this.,</p>
  
  <pre><code>Error report:
  ORA-06550: line 3, COLUMN 37:
  PL/SQL: ORA-00942: TABLE OR VIEW does NOT exist
  ORA-06550: line 3, COLUMN 10:
  PL/SQL: SQL Statement ignored
  ORA-06550: line 4, COLUMN 42:
  PLS-00364: loop INDEX variable 'J' USE IS invalid
  ORA-06550: line 4, COLUMN 1:
  PL/SQL: Statement ignored
  </code></pre>
  
  <p>Can it be achieved in sql query itself,.?
  /</p>