Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL Compare Sytem Tables (sys.table) from (2) different database for comparison

$
0
0

How do I compare SQL system tables sys.table from two (2) databases?

Here the code I tried to use but I get an error message:

SELECT

DB1.*, DB2

.*

FROM

sys.tables

INNER

JOIN DB1onDB2.name= DB1.name

Msg 4104, Level 16, State 1, Line 1

The multi-part identifier DB2.name and DB1 could not be bound


Very Kind Regards, Kevin Scott

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>