title: Stored procedure for counting the row count of all the tables in database of a specific owner
body: <p>I am creating a stored procedure in oracle to find the row count of all the tables. I have to run these procedure daily to find the daily data that is being loaded after ETL. I have created the below procedure.</p>
  
  <pre><code>create or replace Procedure Proc_RSE_TABLE_ROW_Count AS
  
  TYPE c_table_list IS REF CURSOR ;
  C_table_name c_table_list;
  
  RSE_ROW_COUNT NUMBER;
  SQL_11g  VARCHAR2(500);
  SQL_CURSOR VARCHAR2(500);
  V_TABLE_NAME VARCHAR2(30);
  
  BEGIN
  SQL_CURSOR := 'SELECT 
  TRIM(table_name) table_name
  FROM RSE_TABLE_COUNT ';
  
  OPEN C_table_name FOR SQL_CURSOR;
  LOOP
  FETCH C_table_name INTO V_TABLE_NAME;
  EXIT WHEN C_table_name%NOTFOUND;
  
  SQL_11g := 'SELECT COUNT(1) FROM '||V_TABLE_NAME;
  EXECUTE IMMEDIATE SQL_11g INTO RSE_ROW_COUNT;
  
  INSERT into RSE_TABLE_COUNT (TABLE_NAME, ROW_COUNT, DATE_LAST_UPDATED)
  values ('vtable_name', rse_row_count, sysdate)
  
  
  /*UPDATE RSE_TABLE_COUNT SET ROW_COUNT=RSE_ROW_COUNT,DATE_LAST_UPDATED=sysdate
  WHERE table_name=V_TABLE_NAME;
  commit; */
  
  END LOOP;
  CLOSE C_table_name;
  
  END;
  </code></pre>
  
  <p>but instead of which i am currently using i want to insert the daily data. With update the history is getting over ridden. And with insert i am getting error. I want to insert table_name, row_count, and sysdate in the table when i run the procedure without affecting previous data. My i am new to oracle syntax so please help..</p>