How to find out if two tables are identical?

  • Hi,

    I have the same table in multiple databases.

    Theoretically each should be identical to another across databases - in both structure and values.

    However, I am not sure if this is the case, as the databases have been maintained by different developers.

    Is there a quick way to find out of 2 tables are truly identical or not, other then joining on all the columns across databases?

    Please suggest.

    Thank you!

  • I like to use Red Gate SQL Compare.

    Another that I have used on occassion is dbdiff ( http://dbdiff.codeplex.com/ ).

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • MS SQL TableDiff utility might be worth considering

    http://msdn.microsoft.com/en-us/library/ms162843.aspx

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • Thanks for the suggestions.

    Some of my co-workers suggested to use EXCEPT operator and I had a faint memory of MSSQL having some kind of a hash function that would assist in such identification.

    Will explore all the different options.

    Thanks!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply