title: how Do I list all table names in SQL Server using T-SQL?
body: <pre><code>SELECT name FROM sys.databases  -- this can list all database name in the server
  
  
  user database
  SELECT * FROM INFORMATION_SCHEMA.TABLES  
       -- these two line can list the table for one particular database 
  </code></pre>
  
  <p>But how can I output the results like below?</p>
  
  <pre><code>Database              Table
  ---------             -------------
  db1                    t1
  db1                    t2
  db2                    t1
  ...                    ...
  </code></pre>