Compare database table data between environments
A matching schema can still contain different reference data. Data Comparison helps investigate changed and missing rows in corresponding tables, then gives you synchronization SQL to review before making a correction.
Choose your trialOn this page
01 / FEATURES
Choose a question the comparison can answer
Start with a bounded task: confirm a seed-data update, investigate a lookup value or check a reference table between development and staging. Select corresponding tables on same-engine connections and make the comparison scope explicit.
02 / FEATURES
See the change before it runs.
Compare source and target definitions, choose the changes, then review the operation.
03 / FEATURES
Check how records match
Keys determine the relationship between records. Review common primary-key matching, types and null values before treating the difference count as a business conclusion. A mismatch in scope or identity can make two similar datasets appear unrelated.
04 / FEATURES
Inspect the difference itself
Separate missing records from changed values and examine the rows behind the summary. Decide which environment contains the intended value. A source is the selected comparison reference; it is not automatically the business authority for every record.
05 / FEATURES
Review proposed synchronization SQL
Inspect the target, predicates and affected values before copying the generated script into an execution workflow. Retain only the corrections you intend. Another process may change either database after the comparison, so refresh the evidence when the underlying state has moved.
06 / FEATURES
Use the right tool for the next step
Use Schema Sync for definitions. Use Data Copy for a planned refresh with filters, dependencies and masking. Data Comparison is useful for row-level investigation; it should not be treated as proof that entire environments, application settings and external systems are identical.
07 / FEATURES
Read a small row comparison before generating SQL
Imagine two same-engine order tables with a common order_id primary key. The illustrative records below show why a difference count needs interpretation. Here, “absent” means no matching key in the selected scope, not a NULL status value.
Order 101 needs a decision about the intended status. Order 102 could require an insert if the target should contain it. Order 103 could be a target-only record that should remain. A difference is evidence to review, not automatic permission to overwrite or delete data.
Confirm matching keys, compared columns and the rows included before reviewing synchronization SQL. A bounded comparison can answer a specific question about these records; it cannot prove that all other table rows, triggers or application settings match. Recheck the state if another process has changed either database.
| order_id | Source status | Target status | Review question |
|---|---|---|---|
| 101 | pending | ready | Which environment has the intended status? |
| 102 | pending | absent | Should this source-only record exist at the target? |
| 103 | absent | ready | Is this target-only record intentional? |
Questions & answers
Does a clean schema comparison prove the records match?
No. Structure and data are separate. Compare the records that matter to the scenario and confirm the scope used for that check.
Does the comparison automatically correct every difference?
The workflow provides synchronization SQL for review. Inspect the intended target and changes before choosing an execution path.