SQL Table Compare is an SQL tool that will compare the data in two database tables.
The program will show what rows were identical, different, and missing. The tool
generates SQL statements that can be used to synchronize the data in the tables.
The best part is that it is completely free!
The graphical user interface is designed to be very workflow efficient. It is possible to save
a table comparison configuration for later use. F5 runs or refreshes the SQL comparison.
Table 1 and Table 2 remain clearly identified throughout the comparison to minimize confusion.
The SQL diff engine has been used for years in mission-critical environments.
A screen shot:
The results of the comparison are organized into "Different", "Missing From Table 1"
and "Missing From Table 2". For rows that are different the column values that differ
are colored in red. This makes it very easy to find the differences.
If you wish to sync the changes you clickon the "View SQL Sync Statements" link. This
will display the INSERT, UPDATE and DELETE statements needed to sync the data. The
statements are available for either direction - syncing Table 1 to be the same as
Table 2 or Table 2 to be the same as Table 1. You have full control over the sync
as you get to choose the SQL statements and run them.
The app is architected to be automated. The core logic is in a separate DLL from the
UI. This makes it easy to integrate the ability to compare two tables into existing processes.
Currently only Microsoft SQL Server is supported but addition database providers
could be very easily added and the source is freely available.
SQL Table Compare is open source software (OSS). There is no license on this
(e.g. GPL); you are free to use the source for any purpose. The code is C# on .NET 2.0.
There are no warranties with this software, express or implied. Use at your own
risk and always preview the SQL synchronization statements before executing them.
SqlTableCompare.zip 1.0.3 23 KB
.NET Framework 2.0 required - download
Want the source (C#)? Send email to
[2008-08-06] Updated to fix a bug where the wrong column could be used to identify a row for updating.
[2008-08-25] Updated to identify columns with different values by changing the text to red.
[2010-10-14] Updated to:
- support Guids
- fix a PKey bug
- be compatible with SQL Azure
- allow the types of comparisons to be performed to be configured
- allow identical rows to be seen