title: MySQL Tables and row count
body: <p>I am trying to get a list of tables and their number of rows. I have been using this query:</p>
  
  <pre><code>SELECT TABLE_NAME, TABLE_ROWS 
  FROM INFORMATION_SCHEMA WHERE TABLE_SCHEMA = 'myDatabase'
  </code></pre>
  
  <p>I am finding this sometimes returns null. What I would like to do is catch this probably doing something similar to</p>
  
  <pre><code>IFNULL ( TABLE_ROWS, SELECT COUNT(*) FROM ????)
  </code></pre>
  
  <p>Only I'm not sure what I should enter for <code>????</code><br>
  how to make it dynamic based on the TABLE_NAME column?.</p>
  
  <p>Edit: Additional information: I found that the 'tables' not displaying are actually views.</p>