Viewing the SQL differences
Published 13 December 2022
The lower (SQL Differences) pane displays a side-by-side listing of differences in the creation SQL script for an object. To display the SQL Differences pane, click an object in the upper (Results) pane.
You can adjust the height of the SQL Differences by dragging the splitter above it up or down.
SQL Prompt view
If you have a SQL Toolbelt or SQL Toolbelt Essentials license and also have SQL Prompt installed, you will get a SQL Prompt view tab on the SQL Differences pane.
Selecting this view will show you the differences using your currently active SQL Prompt formatting style. To view the differences using a different formatting style, simply change the active formatting style in SQL Prompt (in SSMS).
Viewing differences
Lines that contain differences are displayed with a shaded background; text within a line that is different is displayed with a darker shaded background.
The central column shows the type of difference:
this line of SQL will be added or changed if you deploy this object (the direction of the arrow indicates the database that will be updated) | |
this line of SQL will be removed if you deploy this object |
There is no icon if the two lines are identical.
Use Next and Previous to go to lines that contain a difference. You can also use Alt + Up Arrow and Alt + Down Arrow.
The Line Differences bar
Click and select Line Differences to display the Line Differences bar. The two versions of the line are shown one on top of the other. This is especially useful when the lines are too long to view all the text:
Scroll bar
Colored blocks in the left scroll bar indicate the location in the script of lines that are different.
Searching and copying the creation script
To search the SQL statements, right-click, and click Find.
To search the SQL statements in the other data source, click Find on this side.
The search is not case-sensitive.