Home Forums SQL Server 2005 Development How to compare two tables on different databases RE: How to compare two tables on different databases

  • Since databases are different, use fully qualified name of the databases i.e. prefix the table name with server IP.database.user.table

    To comapre the results, u can use EXCEPT operator.

    loke

    select * from d1..table1

    except

    select * from d2..table2