title: SQL multiple tables reach
body: <p>I have this chunk of code here, thing is it query selected "TestLog" and shows: </p>
  
  <ul>
  <li>name,</li>
  <li>schema,</li>
  <li>rowcount,</li>
  <li>totalspace,</li>
  <li>usedspace,.... </li>
  </ul>
  
  <p>Thing is I need this information to be queried for more than one table, lets say  a 5 specific ones...  can anyone help out? </p>
  
  <pre><code>USE myDB
  GO 
  
  SELECT
    t.name                                                 AS TableName,
    s.name                                                 AS SchemaName,
    p.rows                                                 AS RowCounts,
    SUM(a.total_pages) * 8 / 1024                          AS TotalSpaceMB,
    SUM(a.used_pages) * 8 / 1024                           AS UsedSpaceMB,
    (SUM(a.total_pages) - SUM(a.used_pages)) * 8 / 1024    AS UnusedSpaceMB
  FROM
    sys.tables t
    INNER JOIN sys.indexes i ON t.object_id = i.object_id
    INNER JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id
    INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id
    LEFT OUTER JOIN sys.schemas s ON t.schema_id = s.schema_id
  WHERE
      t.name = ('TestLog') 
        AND t.is_ms_shipped = 0
    AND i.object_id &gt; 255
  GROUP BY
    t.name, s.name, p.rows
  ORDER BY
    t.name;
  GO
  </code></pre>