Open menu
KS DB Merge Tools logo KS DB Merge Tools
database diff & merge
MssqlMerge logo for SQL Server
aka MssqlMerge
KS DB Merge Tools for MySQL logo
KS DB Merge Tools for PostgreSQL logo
KS DB Merge Tools for Oracle logo
KS DB Merge Tools for SQLite logo
AccdbMerge logo
KS DB Merge Tools for Cross-DBMS logo
KS DB Merge Tools All-In-One license
Other tools

Compare Custom Query Results

In this use case, we run a custom SQL query against two SQL Server databases and compare the result sets. You’ll see new and changed rows, define key columns for accurate comparison, and save the query for future use. This feature is available only in the Standard version.

  1. Open databases (see the Schema Changes Summary use case) and click A Query result diff toolbar button.

    for SQL Server, Home tab, click Query result diff
  2. Specify B the query text, C mapping type, and D click Run.

    for SQL Server, Query result diff - setup
  3. Specify E the key columns combination and F click OK.

    for SQL Server, Query result diff - specify keys
  4. The data grids are populated with the comparison result. A row present in both databases with different values is counted as changed (highlighted in red). A row missing in the target is counted as new (green). Use filter G to show only new or changed rows. Headers show H total counts, and the footer shows I column-level differences for the selected row. You can also J save this query in the Diff profile for future reuse. Diff profiles are reusable configurations accessible from the Home tab.

    for SQL Server, Query result diff - result