title: How to iterate through the result of a PLSQL Select
body: <p>I am trying to find how many occurrences of a particular value there are in a particular column in an Oracle database.  The column is used in dozens of tables and I'm going to have to run the queries many times, so I don't want to query each table individually.  I can get a list of the tables to search with something like:</p>
  
  <pre><code>Select table_name from all_tab_cols
     join all_tables using (table_name)
     where column_name = 'EmployeeId' and num_rows &gt; 0
  </code></pre>
  
  <p>The next step is to iterate through that list of table names and output each table that contains a particular value in the EmployeeId column. For example, output might be something like:</p>
  
  <pre><code>**Table Name   Column_name   # Rows for EmployeeId = '123456'**
  Table 1        EmployeeId                    1
  Table 2        EmployeeId                   12
  etc.
  </code></pre>
  
  <p>I'm not a developer and don't have experience using cursors in SQL scripts, so any help would be greatly appreciated.</p>