View SQL differences

You can view SQL differences in the Text Compare pane.

Text Compare displays two script definitions of the same database object—one from the source and one from the target. After reviewing the differences, you can update the target schema to match the source schema.

View differences in Text Compare

To view differences, click or double-click the object in the Schema Comparison results grid.

View SQL differences in Text Compare

Lines with differences appear with a colored background.

Color Name Description
Green background Green background A line that exists only in the source script.
Red background Red background A line that exists only in the target script.
Green background with brighter green fragment Green background with brighter green fragment A line exists in both scripts, but the fragment in brighter green is different from the target.
Red background with brighter red fragment Red background with brighter red fragment A line exists in both scripts, but the fragment in brighter red is different from the source.
Red stripes Red stripes Marks a placeholder for a line that exists only in the target schema at this position.
Green stripes Green stripes Marks a placeholder for a line that exists only in the source schema at this position.
  No color A line is identical in both scripts.

If an object exists only in one schema, its CREATE statement is shown in the corresponding pane.

Note

Objects that differ only in formatting appear in the Identical section of the Schema Comparison results grid. They are not included in the deployment script.

You can assign colors in the Options dialog.

Assign colors

1. In the top menu, select Options.

2. Go to the Text Editor > Text Compare Control page.

3. Choose colors for the lines.

4. Click OK to save the changes.

Text Compare overview

Text Compare is split into:

  • Left pane - Shows the source script.
  • Right pane - Shows the target script.

The ALTER TABLE statement can also contain columns that are automatically added to database tables to track record metadata. These columns usually store information related to record creation, modification, and system updates.

Toolbar

On the toolbar, you can:

  • View the object name, type (for example, table, procedure, or function), and its comparison status.
  • Customize the view of SQL scripts.

Text Compare toolbar

The table describes the toolbar options.

Icon Name Description
Word Wrap Word Wrap Automatically moves text to the next line when it reaches the end of the visible pane.
Show line numbers Show line numbers Displays line numbers to the left of the DDL script.
View White Space View White Space Displays characters, such as spaces, tabs, and line breaks as visible symbols in the pane.
View Hex View Hex Displays the DDL statement in a hexadecimal view.
Format Database Object Script Format Database Object Script Formats the DDL script using the selected profile.
This option doesn’t affect the synchronization script.
Sort Columns Alphabetically Sort Columns Alphabetically Sorts columns in alphabetical order. Also highlights structural differences between columns.
This option doesn’t affect the synchronization script.
Show text comparer in detached window Show text comparer in detached window Opens Text Compare in a separate, floating window instead of docking it within the main application interface.
Collapse Panel Collapse Panel Collapses or expands Text Compare.

The table explains the indicators of comparison statuses.

Icon Name Description
Identical Identical Objects with no differences.
Different Different Objects that exist in both databases but have different DDL definitions.
Only in Source Only in Source Objects that exist only in the source database.
Only in Target Only in Target Objects that exist only in the target database.
Unknown Unknown Objects whose metadata cannot be retrieved.
Inconsistent Inconsistent Objects that differ, but a target object cannot be updated due to incompatibility.

Shortcut menu options

Right-click the script in Text Compare to access shortcut menu options.

Shortcut menu in Text Compare