I am looking for a tool that allows me to compare data from two SQL queries on different databases and see the rows that are different. Both databases are on MS SQL server.

I have looked at following tools but none works properly:

Only RazorSQL fulfills my requirement to some extent but it gives unnecessary SQL error now and then.

Hence, the tool I am looking for:

  • Free or less then $200 per user.
  • Compatible with SQL Server 2008 or later databases.
  • Must provide simple interface to enter queries for both databases.
  • Must provide rows (along with row number) that have differences between the data from two SQL queries.

Note : I am not looking to compare database or tables. I want to compare the data from two SQL queries. Both SQL queries returns data with same column names.


5 Answers 5


There is a tool called SelectCompare that allows you to compare two queries.

SelectCompare allows to create comparison projects, which define queries against any two data sources that can be connected with OLEDB, ODBC or .NET connectors.

The free edition allows to create once comparison project and unlimited number of connections. Here's a screenshot of query entry screen. SelectCompare SQL Query entry You can export query results to Excel and use them subsequently as baseline for your comparisons against live database.

There is more information on the blog on the website.

There is also a video showing how to compare database schema against a baseline. SelectCompare data comparison

DISCLAIMER: I am the owner of the website and the tool.


This tool called "JuxtAPPose" does pretty much does what you mention:

  • Compare query results (can connect to DBs)
  • Can load files instead of a query (e.g. you are validating a report)
  • Costs less than $50 and they also have discount codes in their youtube videos
  • The query interface is pretty simple and can save those comparisons that you use often (so you don't copy and paste queries, configure keys and other settings every time)

I use it very often to validate reports, makes my life easier while comparing the source of my automated reports VS excel spreadsheets that my users send me or to compare before and after for reports and SPs.

This is the page to download/purchase: https://www.juxtappose.com/pricing

Here are a couple of demos:


MssqlMerge Pro allows to compare query results: MssqlMerge Query result diff That's a commercial project (I am the author), a personal license currently costs 75 USD. This feature is also included in all my products for other DBMS. Query itself and column/key mappings can be saved in the special settings files called "diff profiles" to avoid query entry and configuration on the next application run.


nodejs.org and more importantly npmjs.com search for "diff database" or "diff sql"

Example of DIFF

taking the results from your sql, and perhaps pushing it towards a .json format. there are some "diff json" notations. if ya search, some of the "diff" can ignore white space and like for comparing, and showing differences.

there are some excel / data / table / grid javascript frameworks out there. that are more geared in displaying data coming from database. i want to say "datagrid.js" (spelling) search google for something like "javascript spreadsheet"

search npmjs.com for ORM, examples waterline, knex, bookshelf, sequalizejs one of them should be able to handle 2 or more database connections.

PHPMyAdmin it has been awhile, but I want to say, it can output what you type into the "enter SQL" window. into excel like grid format. last time I ran phpmyadmin it had a GUI like interface to help build sql, without having to type it all in. the only thing is I never had to deal with comparing sql statements connecting to 2 different databases within it. I know there are drivers for mssql, and it can connect to multi databases, just not sure if entering sql through it, will allow connections to 2 databases at same time.

wamp / xamp and other web server stacks out there, that come pre-bundled with phpmyadmin if memory serves. granted the wamp / xamp comes with mysql and not mssql out of package but at least give you some example per say in connecting to the mssql servers you have going on.


There is one more tool that is Open DBDiff 0.9 which is an open source database schema comparison tool for SQL Server 2005/2008. It reports and provides a synchronization script to upgrade a database from one to the other.

Open DBDiff can synchronize

  • Tables (including Table Options like vardecimal, text in row, etc.)
  • Columns (including Computed Columns, XML options, Identities, etc.)
  • XML Schemas
  • Table Types
  • CLR Objects (Assemblies, CLR-UDT, CLR-Store Procedure, CLR-Triggers)
  • Triggers (including DDL Triggers)
  • Schemas
  • File groups
  • 2
    That unfortunately doesn't match the requirement of comparing query results. OP doesn't want to compare entire databases or schemata, but result sets only – where the queries might be limited to one table, or can span multiple tables using complex join criteria (see the requirement for a "simple interface to enter queries for both databases"). Your answer would however perfectly match the question Tool for database comparison.
    – Izzy
    Commented Jan 27, 2015 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.