Comparison Query to Compare Two SQL Server Tables [duplicate]
问题 This question already has answers here : sql query to return differences between two tables (12 answers) Closed 3 years ago . I would like to know how to compare two different database table records . What I mean is I will compare two database tables which may have different column names but same data. But one of them may have more records than the other one so I want to see what the difference is between those two tables. To do that how to write the sql query ? FYI : these two databases are