title: How to get a list of all tables in two different databases
body: <p>I'm trying to create a little SQL script (in SQL Server Management Studio) to get a list of all tables in two different databases. The goal is to find out which tables exist in both databases and which ones only exist in one of them.</p>
  
  <p>I have found various scripts on SO to list all the tables of <em>one</em> database, but so far I wasn't able to get a list of tables of multiple databases.</p>
  
  <p>So: is there a way to query SQL Server for all tables in a specific database, e.g. <code>SELECT * FROM ... WHERE databaseName='first_db'</code> so that I can join this with the result for another database?</p>