title: Is it possible to query all tables in a database along with primary key column and its max, min and count?
body: <p>This is the query I have now that can return results for one table at a time.</p>
  <pre><code>use *database_name*
  select
  '*dbo.table_name*' as Table_,
  min(*primarykey_columnname*) Min_,
  max(*primarykey_columnname*) Max_,
  count(*) Count_
  from *dbo.table_name*
  </code></pre>
  <p>I have this requirement in both SQL Server and PostgreSQL. It would be great help if you can help in solution for any of them.</p>