Splitting the query window in SQL Server Management Studio

Category : Tips User Rating : 4 Stars      Views : 4 Stars
One Click Feedback
Please help us to improve the site by rating the quality of this article by clicking a button below.
When copying data into a new table using SELECT INTO it can be useful to add an identity column Splitting the Query Window in SQL Server Management Studio SQL Server Management Studio (SSMS) has a handy feature which allows you to split a query window in two. Just hover over the small rectangular box to the top right of the window (see the picture below).


Splitting Query Window Step 1


When the cursor changes to a pair of parallel lines, click and drag the window down. The window splits into two panes.

Splitting Query Window Step 2

Each part of the window scrolls independently so you can see two parts of the same file at once. Any edits in one part of the screen get reflected in the other.

Splitting Query Window Step 3

This split pane is very useful for viewing and editing those long scripts and stored procedures !

Related Articles

The following articles may also be of interest :

Link back to this article : https://www.sqlmatters.com/Articles/Splitting the query window in SQL Server Management Studio.aspx

Keywords

SSMS,SQL Server Management Studio,query,window


Comments
Post by Dave on Wed 03 Feb 2016 17:46. Report Inappropriate Post

How do you unsplit the window?
Post by T on Tue 05 Apr 2016 16:36. Report Inappropriate Post

To unsplit, just double click the line or drag it all the way up. I wish there was also a horizontal split.
Post by Ravi on Thu 13 Oct 2016 11:21. Report Inappropriate Post

Excellent Article.Kudos and Thanks :)
Post by Frank R. on Wed 08 Mar 2017 18:35. Report Inappropriate Post

I am using Microsoft SQL Server Management Studio 11.0.5058.0. When using the SSMS Editor screen, I can go to the lowest left corner of the Editor screen to adjust the editor zoom level from 100% to a preferred level (typically 70%). Later, when I choose to use split-screen mode, the new screen reverts to 100% while the original screen remains at the level I chose earlier. This is annoying. Can I change a setting so the new split screen zoom level set to the same as the original zoom level?
Post by Krishna on Wed 05 Apr 2017 15:02. Report Inappropriate Post

I want to compare two different sql files, how can I do that
Post by Aubrey Love on Tue 05 Mar 2019 18:19. Report Inappropriate Post
Website : https://sqlfundamentals.wordpress.com/
There is a way to do a vertical split in SQL Server.

How to open two or more SQL Server Query Tabs side-by-side.
1. Start SQL Server
2. Click on “Create New Query” in the toolbar
3. Again, click on “Create New Query” in the toolbar
Now you should have two tabs open and you can toggle between them.
Next step,
1. Right-Click on one of the tabs
2. From the drop-down menu, select “New Vertical Tab Group”
Done. Too Easy.
Repeat the steps above if you would more than two Query windows open side-by-side.


Post a comment   No login required !

Name : Email : Website :
Will be displayed alongside your comment
Not displayed Optional, but displayed if entered