title: How to check if SQL Server table has rows and return table name as column name and value true or false
body: <p>I need to create a view which will query a few specified tables and return a view table with one row. Table must be formed with column with table names and one row must be returned with values True/False depending on the table have rows or not. </p>
  
  <p>For example, I have four tables:</p>
  
  <pre><code>Medication / Patient / User / Appointment
  </code></pre>
  
  <p>I need to check them tables if they have rows or not and return a view table with one row and columns like that.</p>
  
  <pre><code>Medication | Patient | User | Appointment
  True       | False   | False| True
  </code></pre>