IntelliJ IDEA 2019.2 Help

Differences viewer for tables

The primary purpose of the differences viewer for tables is to show the differences and similarities of data.

Compare two table structures

You can compare two table structures and see the differences in columns, keys, indexes, and other structural table elements. To compare data in selected tables, see Compare table data.

  1. In the Database tool window (View | Tool Windows | Database), select two tables.

  2. Right-click the selection and navigate to Compare Ctrl+D.

Compare two tables

Compare table data

You can compare data that is stored in two tables.

  1. Double-click two tables that you want to compare.

  2. In the editor, click the Compare with button (the Compare with button) and select the second table.

    If needed, change the value of the Tolerance parameter in the comparison dialog. The Tolerance parameter defines a maximum number of differences that are allowed between two result sets. For example, if you want to consider two rows as equal if their data differs in a single column, enter 1 in the Tolerance field.

Compare two tables

Detect column insertion

When the tables have different number of columns, extra columns in the table with more columns are ignored. If the Detect column insertion option is on, the most different columns are ignored. On the following picture, the first column in the second table is the most different and so it is ignored. As a result, the second row is shown as containing the same data.

Compare table data

If the option is off, ignored are the last of the columns. On the following picture, the last column in the second table is ignored. So all the rows are shown as containing different data.

Compare table data with Detect column insertion off

Tolerance

Tolerance is how many columns may be different. With zero tolerance on the following picture, the first row is shown as containing different data.

Compare table data tolerance equals to zero

With the tolerance of one on the following picture, the first row is shown as containing about the same data.

Compare table data with tolerance equals to one
Last modified: 17 October 2019