Click here to Skip to main content
15,883,883 members
Articles / SSMS

Tip 2: Exciting SSMS Features Derived from Visual Studio

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
5 Feb 2015CPOL2 min read 6.2K   2   2
In this series of posts, we’ll see few great yet less known and under utilized tips/features that are there since earlier versions of Visual Studio and later made their way to SSMS (SQL Server Management Studio).

Tip 1: Clipboard Ring – Copy Paste rediscovered
Tip 2: Box Selection – Select and Edit text easily


Have you ever imagined selecting a particular portion of the text or rectangular region of the text from multiple rows like the figure -1? Box selection? Why do I need that?

Oh! Believe me, many times while executing queries for various tests, you’ll need it.

Is this really possible?

Sad, with traditional horizontal selection system, you can’t do that.

If you are known to Visual Studio 2010 (release: 12 April 2010) or newer environment, probably you already know this. Since Eclipse 3.5 (release: 24 June 2009), this facility is there. If you have SQL Server 2014 (not sure about SQL Server 2012), you have the power to do columnar selection also known as box selection.


You can do it either way:

  • Holding down the ALT key and dragging mouse to select text as we do for normal selection
  • Using keyboard shortcuts ALT + SHIFT + ARROW KEYS

You can do the following actions through Box Selection:

  • Copy: Copy rectangular region/box of text
  • Text Insertion: Select the box and start typing to replace the selection with typed in new text on every selected line.
  • Paste:
    • Single Copy – Box Paste: On box selection pasting some text will be applied to every line
    • Box Copy – Box Paste: Paste contents of one box selection to another box selection
    • Box Copy – Single Paste: Little weird though. Check what is happening !
  • Zero-Length boxes: Vertical selection of zero characters wide to create a multi-line insertion point for new or copied text. To do this, just hold down the ALT key and keep pressing down/up key till the length you want. This will create a multi-line insertion point.

Hopefully, you liked this tip. Please stay tuned to learn few more exciting tips in this series. I would love to hear from you. Thanks for reading. :)


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Software Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

Questionnice tip -- works in SSMS 2012 too! Pin
BigTimber@home6-Feb-15 2:56
professionalBigTimber@home6-Feb-15 2:56 
Nice tip! Gonna save me a lot of time/trouble. I verified in SQL Server 2012 Management Studio -- works here too.
Thanks Buddy
AnswerRe: nice tip -- works in SSMS 2012 too! Pin
Suvendu Shekhar Giri6-Feb-15 5:12
professionalSuvendu Shekhar Giri6-Feb-15 5:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.