title: Retrieve MAX Primary Key values of all tables in a database at once
body: <p>What I need to do is retrieve the maximum primary key of all tables in my database <strong>at once</strong>? That is, my result will be like if I executed the below 2 queries:</p>
  
  <pre><code>SHOW TABLES FROM DATABASE_NAME
  
  SELECT MAX(PRIMARY_KEY) AS maxId FROM TABLE
  </code></pre>
  
  <p>That is</p>
  
  <pre><code>(first column = TableName , second column = MAX(PK) Of that table)
  </code></pre>
  
  <p>Pardon if I am doing something wrong. I just do not want to write 80 queries because my database has 80 tables.</p>